The update() method refreshes the context menu if it is currently visible.
Available since 2024.4.6226.
Declaration
DayPilot.Menu.update()Parameters
This method has no parameters.
Notes
Call update() after changing menu items while the menu is open to refresh the rendered content.
Example
const menu = new DayPilot.Menu({
items: [
{
text: "Counter",
counter: 0,
onClick: (args) => {
args.preventDefault();
menu.items[0].text = "Counter: " + (++args.item.counter);
menu.update();
}
},
// ...
],
// ...
});See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot