Hi,
I am trying to make a request to our server before returning the context menu in `getWidgetMenuItems` method.
But the context menu not showing correctly when any delay occurs (even if I create a promise with settimeout for 10 ms). The context menu items may not able to display when I click on an item within the board.
If I remove the settimeout, the context menu items will show correctly.
Something like this:
getWidgetMenuItems: async (widgets, editMode) => {
const promise = new Promise((resolve, reject) => {
setTimeout(() => {
resolve(
{
tooltip: 'Tools',
svgIcon: 'svg-icon',
onClick: async() => {
// on click event
}
}
]);
}, 10);
});
const result = await promise;
return Promise.resolve(result);
}
Regards,
K