Async Column
Hey! In my app I need to make some optimizations. Table load is too long and I'm looking for something like Async Column where i would specify rest api endpoint/callback and this column would be resolved asynchronously while rest of content is already in the browser. Is there any way to do this with current API (I already made a custom component and it works fine but I want to structurize this solution)? Is there any thread/issue (I did not found any) that is discussing it?
7 Replies
Not sure what you mean but you can try to use “deferLoading” on the table if the page request is taking too long
But can I use it on just one column? As far as I remember it is not possible and whole table is loaded asynchornously. I just want to fetch couple of columns synchronously (normal way) and then those time consuming columns I want to fetch asynchronously to not make first request take too long.
...why not make it two seperate tables then?
It won’t be UX friendly I believe. As a user I want to have all of the data in one place and don’t want to scroll down to see next table and then match record from second table with first table to let’s say compare data. Let’s say that I display 100 records in the table and have approx. 10 columns. One column is calculation heavy and adds +3seconds to load time. It would be a perfect solution to lazy load part of the data, especially if it takes more time to load. Second example would be column when I want to fetch data by WebSocket, with possible data refresh anytime (without table reload).
...click on a row to see the data that takes long to load is what I meant
No I don't believe you can. This is a feature that would require a custom table. The filament tables' data comes from your query. If you modify that query to do what you want then sure, but I don't have knowledge on if its possible to synchronously load some columns and asynchronously load others. All of the data comes from one source.
As I said I think the best and most simple solution would be to use deferLoading
Hi! Did you find a solution? I need something like this to fetch a status from an API. I would like to have the table loaded and some sort of spinning wheel while the data is fetched from an API and spit out in the column.