Hello, how can I keep this menu bar collapsed when I change pages?
I’ve been trying for eight hours now and haven’t found a solution. The menu bar collapses when you click on this icon and should only expand again when you click it again.
How does it know you clicked the collapse button? are you using the “toggle element” or a state?
What’s stopping you from showing it collapsed by default?
may you can use a fied attached to the user in DB saving that, or save the state in a cookie to avoid that in url parameter
We want the sidebar to always remain in the state last set by the user, even when changing pages
Yes, there is a state for the entire Reusable Group called “is Collapsed yes”/no"
The simplest way is passing a URL parameter and reading it at page load
When you switch pages, the state reverts to its original state. ademiguel is right, the best way to pass the information that nav bar is collapsed or not is the url.
Okay, thanks!
Can you tell me how you would do that? All my attempts have failed so far. Since I can’t assign any additional parameters to the icon that collapses the menu bar, because it’s not also the button for switching pages, I haven’t found a solution yet. Bubble always overwrote the parameter when switching pages.
When you use the Go to page
action, add a key-value pair. It will be added to the URL when navigating to the new page.
Add a When page is loaded
event with a Set state of an element
action. Then select the custom state of your interest and set its value with a Get data from page URL
expression.