Nested Navigation Groups in v3
In v2 I was using a nested naivgation groups, which str no longer supported in v3.
The error that I get is: "Navigation group [] has a nested group, which is not supported in the sidebar design at the moment."
Is there an alternative for that? Here's how my menu was in v2 and I would like to do the same as I have a lot of items:
10 Replies
Unfortunately not at present, we haven't been able to come up with a good design for it. The reason for the notice is because of the support for topbar navigation
Is there a way just to add some "margin-left" per item, so I can simulate somehow the nesting?
Sure you can do that with extraAttributes
so:
->extraAttributes(['class' => 'ml-4'])
It seems that this method does not exist in NavigationItem:
Method Filament\Navigation\NavigationItem::extraAttributes does not exist.
Let me check
It's available with the HasExtraAttributes trait, but NavigationItem does not use it.
Ok you are right 😦
You could look to submit a PR to support it with that rationale
This has been in the back of my mind for a little bit, I would benefit from this PR! It would also unlock many possibilities to customize the navigation items with Alpine.js directives.
Created a feature request here https://github.com/filamentphp/filament/discussions/8033
GitHub
Nested navigation group in V3 · filamentphp filament · Discussion #...
In v2 it it totally possible to add multilevel menu after the PR by @Nuhel But unfortunately the API that is implemented in v3 gives the error such as Navigation group [Test Nav Group] has a nested...
A feature request alone will not help. We are aware that this is a regression, but Zep didn't find a design that fittes all scenarios (groups/no groups, icons/icons, ...). That's the main issue.