vikramlearning / blazorbootstrap

An Enterprise-class Blazor Bootstrap Component library built on the Blazor and Bootstrap CSS frameworks.
https://docs.blazorbootstrap.com/
Apache License 2.0
643 stars 28 forks source link

Sidebar collapsed by default #700

Open gvreddy04 opened 3 months ago

gvreddy04 commented 3 months ago

Discussed in https://github.com/vikramlearning/blazorbootstrap/discussions/699

Originally posted by **heather-timmins** April 30, 2024 Hi, Sorry if i've missed something but can you make the sidebar collapsed by default? and only toggle to open? Thanks ![image](https://github.com/vikramlearning/blazorbootstrap/assets/144691290/5a9d0420-e25e-4979-8364-2f67c78792bc)
psijkof commented 3 months ago

Yes it would be great to have an option InitiallyCollapsed oslt. Now I invoke _sidebar.ToggleSidebar() on initialization. (OnAfterRender)...

GaryWayneSmith commented 3 months ago

It seems this is the default in the current version and I need to go just the opposite direction. My desktop implementations are all defaulting to hide. I don't have an issue with the default the way it is, it would be nice to have a parameter to specify the initial value. Toggle assumes that we know the initial state. If you change it to default, all implementations using toggle on initialize will have to be updated.

LakinduK commented 1 month ago

This would be a great to have feature. Any update on this?