Help with custom table and modal logic.

hi guys ! I need to build a custom page where I need a custom table that uses a collection instead of a query, the collection will be filled via a modal that shows another table with selectable rows and and search functionality. I need to make some calculations based on the selected rows and then add them to the custom table. How can I best approach this ? I want to use the compoents that Filament already uses, but I can't find any documentation on how to build using the components library itself like x-tables or x-filament::modal or I just missed it big time. Apreaciate any help I can get, thanks !
3 Replies
Patrick Boivin
Patrick Boivin16mo ago
This is the most common approach to use a Filament Table without an Eloquent query: https://filamentphp.com/community/how-to-consume-an-external-api-with-filament-tables
Filament
How to consume an external API with Filament Tables by Leandro Ferr...
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
Stavenger
StavengerOP16mo ago
Mmm, interesting, but I will need to be able to manipulate the collection, adding and removing Models, maybe caching it for the user ?
Patrick Boivin
Patrick Boivin16mo ago
It's possible, I'm doing it on one project but it's worth considering using a regular table, even if it's just to store rows temporarily. You can end up recreating a lot of things that you get for free with a regular table...
Want results from more Discord servers?
Add your server