How do I control table loading state?

Hello,

I am figuring out if it is possible to dynamically manage the loading state of a table in Retool ?
For now the only way I've managed to trigger the loading spinner is to link directly a query with the table data (something like {{ myQuery.data }}).
But what if I want more granular control ?
I am looking for something like myTable.setFetching(true) to run inside a js query for example.

Hey @Hatem!

This sounds like an interesting idea, it might be good for the feature request section. Would you mind expanding a bit more on how you'd be using the loading state?

Hey, thanks for the reply!

I am not sure what would be the best API to interact with the table state. But something like exposing the loading property as it is done for text inputs or buttons for example sounds more consistent to me.

image

More generally I found it a bit confusing/inconstant when exploring Retool that some widgets are exposing clearly their states and for others it behave more like a black box.

Got it - It is on our radar to add a similar field in the table inspector, no timeline as of now but I can let you know here once it has been included!

Sorry to revive this but I've been searching for this for a while and haven't found another page about it. Did this feature ever get added? I would love to have this in some of my applications as well.

Hey @ilowe, there haven't been any updates on the feature yet. Would you mind sharing a bit more about your use case for this? We can help think of a workaround if you'd like!

I'd like to see this feature as well although my needs may be different from the others. I have configured actions within the table so that clicking on the action calls a query. I would like to trigger the corresponding button's loading state or the table's loading state by using the isFetching option found on other buttons.

One workaround is to put your table in a Container, and set the Container's Loading condition.

3 Likes