Editable Table "Save Changes" query clears all edits. How to prevent?

I want to add confirmation dialogue to a "Save Changes" query on a table Sometimes. In order to do this, I have created a javascript query which will check a condition, and if the warning dialogue isn't needed, trigger the query. If there does need to be a warning, it will instead open up a modal with the warning, and a button triggering the actual save action. This mostly works, except when my new javascript query finishes and the dialogue is opened, all of the changes are cleared out of my table. How do I prevent this?

Hi @webster

Hmm :thinking: that does seem odd that those changes are cleared from the table. Let me check-in with the team to see why that might be happening.

For the time being, are you able to access the changeSet property on the table to see if the changes are being persisted there?

@Pawan I found a solution. If my javascript query returns a rejected promise, then the values are not cleared. I got my tool to work by doing that after I open the modal.

Nice find there, @webster :clap: