Custom state + URL parameters to show initial page parent group on reload

Hey guys,

Got a quick question.

Here is the setup:

  • 1 page dashboard, populated with parent groups, that are Not visible on page load

  • sidebar buttons (Home, settings, user, etc) that when clicked, set a URL parameter to toggle the specific parent group to appear

  • Inside the parent group, 2 child groups ( 1 populated with buttons and 1 populated with grandchild Groups [ Not visible on page load])

  • In each parent group, I click the buttons, that set a state to make the grandchild groups appear

Problem:

  • On reload of the page, the chosen parent group itself stays on the one before reload, but the grandchild groups cannot be visible due to the state being reset during reload.

Question:

  • What is the best way to solve this, or what logic needs to be changed?

Thank you Bubble community!

How many grandchild groups are there? If it’s manageable, the easiest solution would just be to use URL params for that too.

Yep, that is exactly what I have just done. Removed all states and replaced with URL params. Thank you for answering anyways ^^

1 Like