Maintain expansion after table refresh

If my user is perusing a table that is grouped and has subgroups, then the table is refreshed, it goes back to the default expansion, and the rows which the user was looking at disappear until the group is manually expanded.

1 Like

Hey @shaya ! Chiming in to say thanks for submitting this feature request! This request is logged for our product team, but hasn't been planned to be implemented.

We'll keep collecting user interest here and convey that on the internal ticket, and will share any updates if the status of this request changes. Thanks again for expressing interest in this functionality! I'll also cross-link a related topic: Group in Table Component

1 Like

To @shaya and anybody else tracking this - I don't know exactly when the fix for this particular issue shipped, but grouped row expansions are now preserved as of version 3.164!

We're still experiencing this issue on Retool Cloud 3.181.0. We have a table that has "expand rows by groups by default" checked. When the page is loaded initially, the groups are expanded. When modify the query that populates the table, the groups are collapsed. When the query is reverted back to the original query, the groups are expanded.

Hey @sgodoshian - can you clarify what it means to "modify the query"? Does this mean editing its content? Or just re-triggering the query causes the groups to reset? I'm not able to replicate the same behavior. :thinking:

1 Like

thanks @Darren! yes for sure. We have a automatic Resource query with a WHERE clause that is set to the value of an input. Here's a repro:
2025-04-03_11-08-19

Bug is not limited to this Resource type either. I just repro'd it using Query JSON with SQL to make it simple to run.

[BUG] table groups expand.json (42.0 KB)

Ah ok I see what's happening. The grouping is technically only being applied when the table first loads, meaning only the groups that are present at that point in time are being expanded by default. I can definitely surface this to the team, but one quick workaround is to reapply the grouping via a Success handler on the backing query.

I'll provide an update here as soon as there is news to share!

1 Like