Nested Repeating Group not showing as expandable list after Set State

I’m building an expandable tree menu. I have a Repeating Group (RG_Parent) of type “Country”. Inside each cell, there is a Button “+” and a nested Repeating Group (RG_Child) of type “Division”, filtered by Current cell's Country.

The goal is : when the user clicks “+”, RG_Child expands below the country row to show all its divisions as a list (like an accordion/tree menu).

RG_Child has visible on page load unchecked, and a Conditional :

  • When Current cell's Division's Country is RG_Parent's custom_state

  • Then This element is visible

On “+” click, workflow runs :

  • Set state RG_Parent's custom_state = Current cell's Country

The workflow executes correctly (confirmed in debugger), the state updates, but RG_Child never becomes visible.

Is this the right approach for an accordion/expandable list in Bubble ? If not, what is the recommended pattern ?

1 Like

Seems right, but it helps to see your element tree, as well as screenshots and possibly even the data in the inspector compared to the data in the group that’s supposed to be expanded (to ensure they’re the same).

But for your own debugging:

  • if you re-check ‘this element is visible"‘ (so that custom state doesn’t even affect it), do the children appear as expanded, in the way you want do see it? If not, then you have work to do to figure out layout issues, or if you happened to not have data in the one you’re selecting, etc.

I reviewed my own expand/collapse features and mine is set up quite similar. The only difference is that I grouped the child RG in a group, and set the visibility toggling on that group instead of the RG. I’m not sure if that’s a solve (let alone if it has performance pros or cons).