Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.31k stars 533 forks source link

Click one BarToggle close the other BarToggle in Vertical Bar #1273

Open tarafdarmansour opened 4 years ago

tarafdarmansour commented 4 years ago

Hi It's really great and everyday I find a new improvement in Blazorise. I started using Blazorise about 8 months ago that it has Sidebar. Today SideBar replaced by Vertical Bar. Vertical Bar look very good but I think it has a fault. In Vertical Bar when you select a BarToggle, it opens its submenu. When you have several BarToggle and click them, they stay open and it causes a long vertical menu with scroll. I think it's very nice to clicking a BarToggle cause the other BarToggles close and their submenu hide. What's your idea ? Have you any idea to do it myself ?

stsrki commented 4 years ago

I think @MitchellNZ is already done this. Maybe he can answer it better?

MitchellNZ commented 4 years ago

Hi @tarafdarmansour,

Are you asking for the BarDropdownMenu components to work like an accordion? e.g. Opening a BarDropdownMenu, causes the other open BarDropdownMenu to close automatically (so only one menu can be open at a time?)

Or

When you toggle (show/hide) the VerticalBar component, it will collapse all open BarMenuDropdown components? So next time you show the VerticalBar, everything will be collapsed

tarafdarmansour commented 4 years ago

Hi @MitchellNZ Yes, I'm actually looking for first behavior that BarDropdownMenu work like accordion. I think it's more stylish that the vertical bar looks like new rather than current

DariusScherle commented 4 years ago

Hey @MitchellNZ, what about that feature?

e.g. Opening a BarDropdownMenu, causes the other open BarDropdownMenu to close automatically (so only one menu can be open at a time?)

Is that already done or is there a workaround? Thanks for your answer!

Franz1960 commented 3 years ago

I would be interested in exactly the same question as @DariusScherle. So @MitchellNZ do you have a solution for it? Thanks!