Blazored / Menu

A JavaScript free menu library for Blazor and Razor Components applications.
https://blazored.github.io/Menu
MIT License
176 stars 32 forks source link

Issue with submenu on the server app #13

Closed peterblazejewicz closed 4 years ago

peterblazejewicz commented 4 years ago

I've tried this also under the 3.1.0 Preview 2 there is a still a problem:

menu-bug-host

TBI

aarondcoleman commented 4 years ago

Also noticing the same thing. The IEnumerable<MenuItem> collection is apparently not populated in that mode.

aarondcoleman commented 4 years ago

I figured it out... you need to wrap the sub menu items in <MenuTemplate>....</MenuTemplate> like the documentation example. So:

<BlazoredSubMenu Header="Sub Menu">
        <MenuTemplate>
            <BlazoredMenuItem>
                <NavLink href="counter">Counter</NavLink>
            </BlazoredMenuItem>
            <BlazoredMenuItem>
                <NavLink href="fetchdata">Fetch data</NavLink>
            </BlazoredMenuItem>
        </MenuTemplate>
    </BlazoredSubMenu>
chrissainty commented 4 years ago

Thanks for spotting that one @aarondcoleman. I've updated the sample in the repo