F
Filament13mo ago
Ayz

how to place a custom nav item under a navgroup label

In my panel I have: ... ->navigationGroups([ 'Main', 'Other' ]) ->navigationItems([ NavigationItem::make('Sub') ->parentItem('Other') ]) The intention is for 'Sub' to appear under 'Other' but it doesn't appear. When I replace 'parentItem' function with 'group', it blows up. When I don't have either parentItem or group, the 'Sub' item is placed somewhere else entirely within the (other) resource navigationItems. How do I get it right?
2 Replies
Tieme
Tieme13mo ago
use ->group()
NavigationItem::make('Sub')
->group('Other')
NavigationItem::make('Sub')
->group('Other')
Ayz
AyzOP13mo ago
Oh I see the issue, I had icons on other items and not this one, thats why group was failing! Thanks

Did you find this page helpful?