Hi Team ,
I am implementing a Bryntum Taskboard in react . I want to make a api call and fetch menuItem data from backend on taskMenu (...) click
Can you please guide me on this.
Thanks.
Could be that what you need is the taskmenubeforeshow
event
https://bryntum.com/products/taskboard/docs/api/TaskBoard/view/TaskBoard#event-taskMenuBeforeShow
I tried above code but it's not working as I have to make an api call . taskmenubeforeshow is not an async function.
listeners: {
taskMenuBeforeShow: async({ items }) => {
let response = await axiosWrapper.get("task.Actions.wm", { id: 17354 }, dispatch);
let menuItems = response.data.items;
menuItems.forEach((item) => {
return (items[item.key] = item.text);
});
},
}
Can you please guide me with any other solution
The event does not currently allow async event handlers. This could be added. Here is a ticket : https://github.com/bryntum/support/issues/6249