Change the table content

Hi! I have a roles table, with four header actions (1st image). I would like to show different data in the table depending on the action chosen. E.g.: show the data in 1st image when I click on the firs button on the left; show the data structure in 2nd image when I click on another button. Maybe is better to use a Livewire components/custom page, but I can't seem to make it work. I create class and view with the
php artisan make:filament-page
php artisan make:filament-page
, but I don't know how to render it. Thank you so much
No description
No description
16 Replies
bwurtz999
bwurtz999β€’14mo ago
You shouldn't need a custom page for this. You could try using ->modifyQueryUsing()
bwurtz999
bwurtz999β€’14mo ago
Oh wait sorry I misread your question Have you tried a relation manager? This would be pretty complex to accomplish in one table. I'm not sure it's possible
Davide Cariola
Davide CariolaOPβ€’14mo ago
No problem at all! πŸ˜„ I've just managed to create to use a Livewire Page with the Roles table in it. Now I think I have only to manage the different "tabs" with a switch
Davide Cariola
Davide CariolaOPβ€’14mo ago
No description
Davide Cariola
Davide CariolaOPβ€’14mo ago
I can simply start from here
bwurtz999
bwurtz999β€’14mo ago
Actually, now that I think about it, you could do this using two different Livewire components on a custom page
Davide Cariola
Davide CariolaOPβ€’14mo ago
Yep, I think that now is more Livewire than Filament 🀣
bwurtz999
bwurtz999β€’14mo ago
And you would just display the table like you have done with the standard roles table Yes, definitely Livewire at this point haha
Davide Cariola
Davide CariolaOPβ€’14mo ago
Thank you so much πŸ˜„
bwurtz999
bwurtz999β€’14mo ago
I'm trying to think about how you would switch the displays though between Livewire components
Davide Cariola
Davide CariolaOPβ€’14mo ago
Usually, I'll do it with a switch and a "page" property every button sets a different page number, and then the switch does the magic. But I have to try it, and maybe not at 00:30 If you're interested, I can post here the code if I get it right
bwurtz999
bwurtz999β€’14mo ago
Yes, please do! I'm interested!
Davide Cariola
Davide CariolaOPβ€’14mo ago
Sure thing πŸ’ͺ🏻
awcodes
awcodesβ€’14mo ago
Have a look at #filter-sets. It’ll save you all the headache.
Davide Cariola
Davide CariolaOPβ€’14mo ago
Thank you so much, I'll look into it
Want results from more Discord servers?
Add your server