Hello,
We are trying to implement a submenu for a Context menu in our Daypilot Scheduler component we but are getting an error indicating ‘items’ does not exist in type ‘MenuItemData’.
The code we are using is the same as in the Javascript example located in https://doc.daypilot.org/menu/submenus/ although it has been rewritten for Typescript.
i.e.
contextMenu: new DayPilot.Menu({
items: [
{ text: "Show event ID", onClick: function () { alert("Event value: " + this.source.value()); } },
{ text: "Show event text", onClick: function () { alert("Event text: " + this.source.text()); } },
{ text: "Show event start", onClick: function () { alert("Event start: " + this.source.start().toStringSortable()); } },
{ text: "Go to google.com", href: "http://www.google.com/?q={0}" },
{ text: "CallBack: Delete this event", command: "delete" },
{
text: "submenu"
,items: [
{text:"Show event ID", onClick: function() {alert("Event value: " + this.source.value());} },
{text:"Show event text", onClick: function() {alert("Event text: " + this.source.text());} }
]
}
]
}),
We have developed our solution using Angular and Typescript in the front-end with a C# backend.
We are currently licensed for and using Daypilot-pro-angular.
Why is it that the items array in the sub-menu not recognized?
How can we get around this issue?
With Thanks,
David