onListVariableFolders
Variable folder listing handler
This example demonstrates how the onListVariableFolders callback
retrieves all variable folders for a project from the host application's persistent storage. Once the folders have been retrieved, they are returned to the widget
through the
onResponse
callback.
Variable folder listing handler
onListVariableFolders: (projectKey: string, onResponse: (result: DIQ_Result, folders: Array<DIQ_VariableFolder> | null) => void) => {
// Retrieve all variable folders for the project
const folders = database.getVariableFolders(projectKey);
// Return the folders to the widget
onResponse(
{ success: true },
folders
);
};