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β€’10mo ago
You shouldn't need a custom page for this. You could try using ->modifyQueryUsing()
bwurtz999
bwurtz999β€’10mo 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 Cariolaβ€’10mo 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 Cariolaβ€’10mo ago
No description
Davide Cariola
Davide Cariolaβ€’10mo ago
I can simply start from here
bwurtz999
bwurtz999β€’10mo ago
Actually, now that I think about it, you could do this using two different Livewire components on a custom page
Davide Cariola
Davide Cariolaβ€’10mo ago
Yep, I think that now is more Livewire than Filament 🀣
bwurtz999
bwurtz999β€’10mo 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 Cariolaβ€’10mo ago
Thank you so much πŸ˜„
bwurtz999
bwurtz999β€’10mo ago
I'm trying to think about how you would switch the displays though between Livewire components
Davide Cariola
Davide Cariolaβ€’10mo 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β€’10mo ago
Yes, please do! I'm interested!
Davide Cariola
Davide Cariolaβ€’10mo ago
Sure thing πŸ’ͺ🏻
awcodes
awcodesβ€’10mo ago
Have a look at #filter-sets. It’ll save you all the headache.
Davide Cariola
Davide Cariolaβ€’10mo ago
Thank you so much, I'll look into it
Want results from more Discord servers?
Add your server
More Posts
Focus on relation manager on page loadIs it possible to autofocus on the relation manager group instead of the edit form? I want the user Is it possible to render a table component inside a form component?I want to render a table of model records that use the selected rows to save a relationship. A relaThe GET method is not supported for route livewire/updateHello! I am not familiar with Filament. Just installed it for test, open in browser /admin page and RelationManager actionsHi all, Need to add print button in RelationManager actions. It should be look like: `->actions([ Using Spatie's Laravel-permission, is there a way to assign roles to a pivot table?For example, if I have a User that is associated with a Tenant, but also Groups within Tenants, can Calculated State Typed property Filament\Forms\Components\Component::$container must not be accessedIn my UserResource class, I'm attempting to populate a toggle based on the soft delete flag on the uIs there a way to limit the amount of relations that can be selected when using a relationshipIs there a way when clicking Add Product and they select a product , you only allow a max of 3 to beFiltered DataI want to export only filtered table data to a csv , For instance, 10 records are in the database, aHow to speedup livewire update response on edit page relation manager?I have edit page with 2 relation manager, and every change tab between 2 relation manager, the speedGetting a `required` validation error when running the `make:filament-widget` commandIn the latest version (`v3.0.63`), running `artisan make:filament-widget` without using a resource,