navigationGroup

i used protected static ?string $navigationGroup = "interviews"; in some resources to groub it together but i need to set this navigation groub closed by default.
4 Replies
Igor
Igor11mo ago
You can pass ->collapsed(), but do you need to declare the groups on panel configs https://filamentphp.com/docs/3.x/panels/navigation#customizing-navigation-groups
Ahmed Ali
Ahmed AliOP11mo ago
->navigationGroups([
NavigationGroup::make()
->label('Shop')
->icon('heroicon-o-shopping-cart'),
NavigationGroup::make()
->label('Blog')
->icon('heroicon-o-pencil'),
NavigationGroup::make()
->label(fn (): string => __('navigation.settings'))
->icon('heroicon-o-cog-6-tooth')
->collapsed(),
]);
->navigationGroups([
NavigationGroup::make()
->label('Shop')
->icon('heroicon-o-shopping-cart'),
NavigationGroup::make()
->label('Blog')
->icon('heroicon-o-pencil'),
NavigationGroup::make()
->label(fn (): string => __('navigation.settings'))
->icon('heroicon-o-cog-6-tooth')
->collapsed(),
]);
how to groub navgations element inside it and i try it on exits groub and it give me groub static not close and not open?
Igor
Igor11mo ago
For add resources inside the nav group you can set navigation group string inside the resource https://filamentphp.com/docs/3.x/panels/navigation#grouping-navigation-items-under-other-items
Ahmed Ali
Ahmed AliOP11mo ago
i used this way to group navigation items
protected static ?string $navigationGroup = 'Settings';
protected static ?string $navigationGroup = 'Settings';
now how to set this group as closed by default and when click its items are appearing?
Want results from more Discord servers?
Add your server