Skip to content

Remember collapsed state of Show EntityList & Dashboard fields - #791

Merged
aguingand merged 1 commit into
10.xfrom
fix/show-field-remember-collapsed
Oct 30, 2026
Merged

aguingand merged 1 commit into
10.xfrom
fix/show-field-remember-collapsed

Conversation

@aguingand

Copy link
Copy Markdown
Contributor

Problem

EntityList and Dashboard fields in a Show page always came back with their default collapsed state (collapsable) when navigating back, even though onToggle() wrote remembered.collapsed. The collapsed ref was initialized from props before useRemember and never read the remembered value back (// TODO handle remembered collapse state).

Fix

  • Call useRemember first (default collapsed: props.collapsable) and initialize collapsed from remembered.value.collapsed.
  • Guarded by props.collapsable, so a non-collapsable field can't start collapsed.
  • EntityList: a highlightedInstanceId still forces the list open.

Note: since this relies on Inertia history state, the collapsed state also persists across a page refresh.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aguingand
aguingand merged commit c4a3566 into 10.x Oct 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant