Skip to main content

onVariableUpdate

Last updated 23/07/2026

Variable update handler

This example demonstrates how the

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.

TypeScript
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
});

};