Exemple #1
0
        public async Task HandleOnClick(MouseEventArgs args)
        {
            if (!RootMenu.Selectable)
            {
                return;
            }

            RootMenu.SelectItem(this);

            if (OnClicked.HasDelegate)
            {
                await OnClicked.InvokeAsync(args);
            }

            if (ParentMenu == null)
            {
                return;
            }

            if (RootMenu.Mode != MenuMode.Inline)
            {
                await ParentMenu?.Collapse();
            }
        }