Completed
Last Updated: 09 Nov 2020 07:27 by ADMIN
Release 2.20.0
I would expect that setting HasChildren to false would prevent sub-menus and expand arrows from the current item. It does not. I am using hierarchical data binding.
Completed
Last Updated: 10 Jul 2020 07:03 by ADMIN
Release 2.16.0
Created by: Jaco
Comments: 1
Category: Menu
Type: Feature Request
3
I don't see any examples with a menu item separator.  Is there a way to create a menu item separator?
Completed
Last Updated: 26 Jul 2022 17:14 by ADMIN

Dear,

 

the blazor menu UI adapt it self for hamburguer menu when mobile?

best,

 

Jeff

---

ADMIN EDIT

I have attached to this post a sample implementation that you can use as base. Another option is to add more conditional markup to remove the menu altogether and replace it with another structure for small screens. A third option is to use the Drawer component as it collapses anyway (see here and here).

----

Unplanned
Last Updated: 21 Jul 2022 12:16 by Rick
Created by: Sylvain
Comments: 2
Category: Menu
Type: Feature Request
12

Is there a way to not create menu programmatically but only using "html" elements ? Something like this :

 <TelerikMenu>

    <TelerikMenuItem Text="File">

        <TelerikMenuItem Text="Open" OnClick="@OnFileOpenMenuClick"/>

        <TelerikMenuItem Text="Save" OnClick="@OnFileSaveMenuClick"/>

    </TelerikMenuItem>

 </TelerikMenu>

 


Duplicated
Last Updated: 02 Mar 2020 13:24 by ADMIN
Created by: Allan
Comments: 3
Category: Menu
Type: Bug Report
0

Using the demo on https://demos.telerik.com/blazor-ui/menu/index if you select Item 1 with the left mouse button, both Item 1 and Item 2 drop downs open, see attached images

 

 

Duplicated
Last Updated: 30 Nov 2022 08:32 by ADMIN
Created by: Alberto
Comments: 4
Category: Menu
Type: Feature Request
37
The show event of the child items should be configurable. It must be possible to expand them on click only, not when passing over them with the mouse.
Completed
Last Updated: 18 Feb 2022 20:58 by ADMIN
Release 3.1.0
Created by: Alberto
Comments: 5
Category: Menu
Type: Feature Request
33

At the moment, when you click a menu item it does not hide.

A method can be exposed to hide the expanded items that can be invoked from the OnClick handler.

---

ADMIN EDIT

Here is a potential workaround - when the menu item is clicked, we use a little bit of JS to go over the menu items at the root and make the browser think that the user moved the mouse away from them which is the signal for the menu dropdowns to hide. Do test this carefully before using in production, though.

@inject IJSRuntime _js

@* Move this script together with other scripts in the project, it is here to make the snippet shorter *@
<script suppress-error="BL9992">
    function closeMenu() {
        setTimeout(function () {
            var mouseLeaveEvent = new Event('mouseleave');
            var rootNodes = document.querySelectorAll("li.k-menu-item");
            rootNodes.forEach(function (elem) { elem.dispatchEvent(mouseLeaveEvent); })
        }, 30);
    }
</script>

<TelerikMenu Data="@MenuItems"
                ItemsField="@nameof(MenuItem.SubSectionList)"
                TextField="@nameof(MenuItem.Section)"
                UrlField="@nameof(MenuItem.Page)"
                OnClick="@((MenuItem item) => OnClickHandler(item))">
</TelerikMenu>

@code {
    public List<MenuItem> MenuItems { get; set; }

    async Task OnClickHandler(MenuItem item)
    {
        await _js.InvokeVoidAsync("closeMenu");
    }



    public class MenuItem
    {
        public string Section { get; set; }
        public string Page { get; set; }
        public List<MenuItem> SubSectionList { get; set; }
    }

    protected override void OnInitialized()
    {
        MenuItems = new List<MenuItem>()
                {

            new MenuItem()
            {
                Section = "fetchdata",
                Page = "fetchdata"

            },
            new MenuItem()
            {
                Section = "counter",
                Page = "counter"
            },

// sample URLs for SPA navigation
new MenuItem()
{
    Section = "Company",
    SubSectionList = new List<MenuItem>()
                        {
        new MenuItem()
        {
            Section = "Overview",
            Page = "fetchdata"
        },
        new MenuItem()
        {
            Section = "Events",
            Page = "fetchdata"
        },
        new MenuItem()
        {
            Section = "Careers",
            Page = "counter"
        }
    }
},
// sample URLs for external navigation
new MenuItem()
{
    Section = "Services",
    SubSectionList = new List<MenuItem>()
                        {
        new MenuItem()
        {
            Section = "Consulting",
            Page = "counter"
        },
        new MenuItem()
        {
            Section = "Education",
            Page = "fetchdata"
        }
    }
},
new MenuItem()
{
    Section = "Contact",
    Page = "counter"
}
};

        base.OnInitialized();
    }
}

---

Completed
Last Updated: 11 Mar 2021 09:09 by ADMIN
Release 2.23.0

Use any demo and rapidly hover between parent menu items:

1 2