DayPilot.Menu.update

The update() method refreshes the context menu if it is currently visible.

Available since 2024.4.6226.

Declaration

DayPilot.Menu.update()

Example

const contextMenu = new DayPilot.Menu({
    items: [
        {
            text: "Counter",
            counter: 0,
            onClick: (args) => {
                args.preventDefault();
                contextMenu.items[0].text = "Counter: " + (++args.item.counter);
                contextMenu.update();
            }
        },
        // ...
    ]
});