Skip to main content

onDimensionsUpdate

Last updated 12/05/2026

Dimensions update handler

This example demonstrates how the

callback receives the updated
DIQ_Dimension
objects and saves them in the host application. Once completed, the result is returned to the widget through the

onResponse
callback.

TypeScript
Dimensions update handler
onDimensionsUpdate: (
dimensions: Array<DIQ_Dimension>,
onResponse: (result: DIQ_Result) => void
) => {
fetch("/api/dimensions", {
method: "PUT",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ dimensions })
})
.then(() => {
onResponse({ success: true });
})
.catch((error) => {
onResponse({ success: false, error });
});
};