onVariableUpdate
Variable update handler
This example demonstrates how the onVariableUpdate callback
persists changes made to an existing variable within the host application. Once the updated variable has been successfully saved, the result is returned to the widget through
the
onResponse
callback.
Variable update handler
onVariableUpdate: (variable: DIQ_Variable, onResponse: (result: DIQ_Result) => void) => {
// Update the variable in the application's database
database.updateVariable(variable);
// Notify the widget that the operation completed successfully
onResponse({
success: true
});
};