Hi,
We utilize a custom context menu to enable users to click on the space below Gantt tasks and add new tasks. But when they click on the final row, the menu doesn't adjust to show all the items. Is there a way to adjust the position like how it does for the default context menu?
Steps to replicate:
Go to advanced forum ( https://bryntum.com/products/gantt/examples/advanced/ )
In code editor, Add Menu in the bryntum gantt import statement and add the following code at the very end:
gantt.subGrids.normal.element.addEventListener('contextmenu', (event) => {
event.preventDefault();
const menu = new Menu({
x: event.x,
y: event.y,
items: {
"addOptions": {
"text": "Add Task",
},
"addTwoOptions": {
"text": "Add Two Task",
}
}
});
});
Search for 'Configure'
On the gantt side, right click at the lowest part of the schedule, the custom menu appears in the following way:
Can the context menu adjust if it know there is no space to show all the items like in the default context menu?
Thanks,
Rayudu