Can I defer-loading a table column/cell?
I need it because there's one column that fetches from an external API, individually. So waiting the whole table to load is not fun, right?
I expect that the table load normally, but that column will be 'loading' and show the result later.
4 Replies
can the api handles your calls for 25 rows or more without throttling? the possible approach probably is to use livewire component as column. or use table action to fetch those records you need
The api is strong enough to serve massive requests, but each may need few seconds for the response as it needs to fetch from connected device. So yeah it can be considered as throttling but it is the nature of that api. Outside the filament, I can make pool request to grab them concurrently, but not sure with livewire or filament table.
Is it possible to merge the responses with the eloquent data before reaching the table? I couldn't find similar way like form->fill() or mutateDataXXX for filament table
I think the best is use alpine x-init to call livewire function which call the api then display with x-data
So your table can render without waiting the api
Of course you should have some caching or something to avoid keep requesting the api
Good idea, will try to explore it... Thanks for the idea and your time