onListDimensionCustomValues
Dimension custom value listing handler
This example demonstrates how the onListDimensionCustomValues callback
retrieves all custom values associated with a dimension from the host application's persistent storage. Once the custom values have been retrieved, they are returned to the
widget through the
onResponse
callback.
Dimension custom value listing handler
onListDimensionCustomValues: (dimension: DIQ_Dimension, onResponse: (result: DIQ_Result, dimensionCustomValues: Array<DIQ_DimensionCustomValue> | null) => void) => {
// Retrieve all custom values for the dimension
const dimensionCustomValues = database.getDimensionCustomValues(dimension.key);
// Return the custom values to the widget
onResponse(
{ success: true },
dimensionCustomValues
);
},