Auto Refresh Table After API Update and Loading Element

Goal:

I want to automatically refresh a table on my webpage whenever an API updates the underlying Retool database table. Additionally, I'd like to display a "loading" element while the table is refreshing.

Steps:

  1. I have a button that triggers an API query.
  2. The API successfully updates a table stored in my Retool database.
  3. I'm not sure how to make the table on the webpage refresh automatically to reflect the new data.
  4. I'd also like to add a visual cue (like a loading spinner) while the refresh is happening to improve the user experience.

Details:

  • I'm using a Retool table component to display the data.
  • The API query is working correctly and updates the database.
  • I'm unsure about the specific Retool features or JavaScript code needed to achieve the auto-refresh and loading element behavior.

I'd appreciate any guidance on the best way to implement this functionality.

Additional Notes:

  • If you're using a custom component or integration, please provide details about it.
  • If you're on a self-hosted Retool instance, please share the version you're using.

Let me know if you have any further questions or need more clarification!

Hello @Boris_Buhin ,
You can refresh the table by updating the data through the query or API. On successful completion of the API call, trigger the table refresh.

2 Likes