Hello,
Just wondering if I can add a customised api call to this 'Change column' action, so that the change column action can sync to the backend?
Thanks.
Hi,
What is your expected behavior on that? This menu is generated according the number of columns that the TaskBoard has.
You can check the docs here https://bryntum.com/products/taskboard/docs/api/TaskBoard/feature/TaskMenu
tasnim wrote: ↑Fri Dec 06, 2024 7:24 amHi,
What is your expected behavior on that? This menu is generated according the number of columns that the TaskBoard has.
You can check the docs here https://bryntum.com/products/taskboard/docs/api/TaskBoard/feature/TaskMenu
Hello @tasnim, this is the expected behaviour:
And I want to add a custom api for this action so that, not only the ui change is visible, also the change is synced with downstream. Is there a way that I can do that?
You could achieve it by adding an API call inside the onItem
features : {
taskMenu : {
items : {
column : {
onItem({ taskRecord, item, source }) {
if (item.isColumn) {
taskRecord.setValue(source.columnField, item.ref);
item.parent.items.forEach(sibling => {
if (sibling !== item) {
sibling.checked = false;
}
});
}
// make an API call here
}
}
}
}
},
tasnim wrote: ↑Fri Dec 06, 2024 12:27 pmYou could achieve it by adding an API call inside the
onItem
features : { taskMenu : { items : { column : { onItem({ taskRecord, item, source }) { if (item.isColumn) { taskRecord.setValue(source.columnField, item.ref); item.parent.items.forEach(sibling => { if (sibling !== item) { sibling.checked = false; } }); } // make an API call here } } } } },
@tasnim this works like a charm! Thank you so much