Infinite loop after updating records in a table

In a table I have a checkbox I need to be editable. In the column 'Prime' on Change cell it calls an update query. When in the query after success I want to clear the changeset but this ends up firing the update query infinitely. What am I doing wrong?

chrome_Xy12EQPzM2

chrome_2ihsj5Abr8

Hi @Shawn_Optipath,

Are you clearing the changeset because now the live data is accurate? If that's the case, you could instead just refresh the table, that will clear the changeset and it will show the most up-to-date data in the table.

Hi @MikeCB ,
I am clearing the changeset because if I don't the changeset keeps adding data if I click on a second row. In my update query I am referencing the first item in the changesetarray[0].

I just tried the refresh upon success in the update query and it goes into an infinite loop as well. Strange behavior. It must be something simple I've missed.

Do you have some other event handle getting triggered by it? You could also try using ‘changesetarray.slice(-1)’ to always grab the last element, instead of referencing the 0 index directly.

I had the query running automatically. The loop went away when I changed it to manual.