FilamentF
Filament7mo ago
shuvox

How to default a navigation group to collapsed on first load?

->navigationGroups([
NavigationGroup::make()
->label('Users')
->icon('heroicon‑o-users')
->collapsible()
])

I’m building an admin panel with a "Users" navigation group, which contains Roles, Permissions, and Users submenu items.
However, whenever I first load the page, the group is always expanded by default—even if I haven’t clicked anything. I’d like the submenu to start collapsed (hidden), and only expand when the user clicks the group icon.

🙏 Would love to hear your approaches or insights here—thanks!
Screenshot_2025-06-16_at_10.23.42_PM.png
Solution
yeah, by modifying localstorage key collapsedGroups in render hook resolved the issue.
Here is my updated code in panelprovider
https://codeshare.io/5Od9Dr
Was this page helpful?