Deleting data out of table with javascript and then refreshing the table without sql re-query

Hi,

I've run a query to update a row in a table. After this update, I want to delete this row out of the table, but the table won't refresh. Will only refresh if I requery the whole table from the dadtabse which is slow and undesirable. Is there anyway I can update the state of the table without having to pull from the database?

Here's my code:

for (const property in get_recent_sessions.data){
get_recent_sessions.data[property].splice(0,1);
}

With the update of these arrays I want the table which is populated by this arrays to update.

Hi @kuda, whenever you're querying anything in Retool (and most apps/websites), it's only taking a snapshot in time of your database and is not 'live'. In order to get your table to refresh, you'll need to set an onSuccess event handler to your query to fetch data from your database again after making an update. Wish I had better news for you here.