F
Filament3w ago
Xavi

Two list sfor one resource

I have two lists for a single resource: UserInvoiceResource, which includes ListUserInvoice and ListProforma (both using the same '$model'). I've tried adding them as NavigationItems, but the active button on the sidebar isn't working as expected. Does anyone know how to fix this?" Thanks
3 Replies
dissto
dissto3w ago
Perhaps you could try something like this on your Navitem?:
NavigationItem::make('user_invoices')
// ...
->isActiveWhen(fn () => request()->routeIs('filament.admin.resources.user-invoices.index')),
NavigationItem::make('user_invoices')
// ...
->isActiveWhen(fn () => request()->routeIs('filament.admin.resources.user-invoices.index')),
🤔
Xavi
XaviOP3w ago
yes i try it, but it make active on sidebar both of lists
dissto
dissto3w ago
Can you show more code?
Want results from more Discord servers?
Add your server