[QUESTION] Sidebar show/hide state and sidebar nav-treeview open/closed states preserved on page load?
This is for the current build of AdminLTE v4.0.0-alpha1
I am not sure if this is something that is looking at being added or not in this project, but I find it as needed functionality. Do others that use this template have this same need or not? I would think that most users would want this preserved and not reset when they click a link to a new page and lose their place on the sidebar menu.
- When the sidebar menu is toggled to be hidden or shown then the state of the sidebar needs to be saved and honored on a page refresh or when I return to the site. The browsers localStorage makes the most sense for this, unless someone has need to save it to a database then they would have to provide that code.
- When the sidebar navigation treeview components are opened/expanded or closed/collapsed the state should be saved so on a page refresh or when I return to the site the state is preserved. Again, the browsers localStorage makes the most sense for this unless someone has a different need they would have to provide the code for that need. From a basic standpoint a Map array saved as JSON is the easiest way to collect the info to save and read and apply. It needs to be able to go as deep as needed for nested navtree's.
~~I have modified this among other things for my use in the AdminLTE v4.0.0-alpha1 code these changes like fullscreen mode.~~
~~These changes can be seen on my fork of the current project. If this is something that looks appealing, I can see about making a PR for it or you can pull the code from my fork.~~
Edit (2022-04-01): this did not work and caused more issues due to the way the CSS is working. It aloud for the open menus to reopen on page load, but the highlighting of active menus was all messed up.