Workaround table loading while data is fetching

Hello!
I have a table which displays data I receive from an API. Unfortunately I can only get 25 entries at a time, hence I am using deep pagination.
The way I handle it right now is: I have a modal that opens as soon as I execute the search which contains the table. I would like it to display some kind of loading icon or any indication, that the code is working and is actively sending requests.

I know that currently such a loading state is not implemented for tables in retool. As I have found in the following thread: How do I control table loading state? - #10 by Orestis_Skoutellas
My idea would be something along the lines of: Execute search --> open modal with text saying "retrieving data" (or something similiar) and when the API request is finished, open the modal with the table.
I have no idea how I would execute that, so I would appreciate if anyone could lend me a hand or tell me their ideas.

Thank you in advance!

Hi @Katunga,

I think theres several different ways you could set this up.

One option is to put the table in a container and control the container loading state

Otherwise, you can leverage event handlers. You can have an event to show the "retrieving data" module upon search. Then, on success of the API request, have two event handlers - one that shows the table modal and one that hides the other modal (using control component)

Depending on your app, you might also be able to leverage the Hidden property of the modals to show/hide them as needed. If possible, I recommend event handlers though for more control

I used a container and its loading state in the meanwhile, Ill your way a try as soon as possible!