The update() method refreshes the context menu if it is currently visible.
Available since 2024.4.6226.
DayPilot.Menu.update()This method has no parameters.
Call update() after changing menu items while the menu is open to refresh the rendered content.
const menu = new DayPilot.Menu({
items: [
{
text: "Counter",
counter: 0,
onClick: (args) => {
args.preventDefault();
menu.items[0].text = "Counter: " + (++args.item.counter);
menu.update();
}
},
// ...
],
// ...
});