onListVariables
List variables handler
This example demonstrates how the onListVariables callback
retrieves variables belonging to a specific variable folder from the host application. Once the variables have been retrieved, the result and variable list are returned to
the widget through the
onResponse
callback.
List variables handler
onListVariables: (folder: DIQ_VariableFolder, onResponse: (result: DIQ_Result, variables: Array<DIQ_Variable> | null) => void) => {
// Retrieve variables belonging to the selected folder
const variables = database.getVariablesByFolder(folder.key);
// Return the variables to the widget
onResponse({
success: true
}, variables);
};