Table done loading event

Is there a way to know that a table is done loading?

You can set up a notification for when the query is completed but rendering the data may not occur immediately. It will depend on how you have built your table component....

My table is par t of a module. The data source of the table is a transformer that operates on an input parameter to the module. I want to change the state of the table (setting filters on the table) after the data is loaded, based on the data itself.

Hi @Michael_Hampton

Great question!

Hmm, transformers might be a bit tricky here compared to queries. Queries have success handlers where you can trigger filtering on success, and they also have an .isFetching property that you can watch to see if the query is completed.

Are you using a transformer since JS queries don't have a way to trigger automatically? I wonder if we could use this workaround in order to use a JS query & then trigger the filtering action on success of the JS query. Let me know if you think this could work or if you have another reason to use a transformer.

I am using the transformer to adapt the table data that is set on the module input to have a display specific structure. This is a pretty involved transform, including adding 'columns', and mutating individual rows based on the data in the row, as well as flattening the data which has a tree like composition of recurring structures.

This is all with the end effect of having the table display a "tree table" with expandable rows. I use the filters on the table to hide/display "child" rows.

I have managed to get this to work like I wanted by having the transform set values on the rows, and modifying the filters to operate on these values.

Knowing that a table was done initializing would be helpful in other cases, and I would still like to have some event that indicates - "The table is done initializing".

Thank you for sharing! It looks like we have an internal request for updating the table to better determine when it has loaded. I'll add your feedback there!