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 , but I don't know how to render it.
Thank you so much
16 Replies
You shouldn't need a custom page for this. You could try using
->modifyQueryUsing()
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
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
I can simply start from here
Actually, now that I think about it, you could do this using two different Livewire components on a custom page
Yep, I think that now is more Livewire than Filament π€£
And you would just display the table like you have done with the standard roles table
Yes, definitely Livewire at this point haha
Thank you so much π
I'm trying to think about how you would switch the displays though
between Livewire components
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
Yes, please do!
I'm interested!
Sure thing πͺπ»
Have a look at #filter-sets. Itβll save you all the headache.
Thank you so much, I'll look into it