Table selection getting discarded after modal is opened

Can someone tell me why is the selection from the table getting discarded after the modal is opened?

You can see for a split second that the modal opens with a selection but then loses it.


Hey Nikhil!

Happy to help here! The "Save Changes" button is meant to trigger a bulk update action and by default resets any updates to the table when clicked. This is the default behavior since we want the UI to reflect that these changes are not saved to your database yet. Are you looking for this modal to act as a confirmation of these changes?

If so, you could set up an external button that triggers a modal that references {{table.recordUpdates}} and on submit in the modal you could run the bulk update action.

Do you think this could work for your use case here?

Hey Chris, thanks for your detailed response.

You are correct, I am looking for the modal to act as a confirmation of these changes.

I did setup an external button to trigger the modal and it works as expected. But this external button below the table looks somewhat odd.

I disabled the table's Save Changes button so that there is less confusion.

Is there any way to hide the table's Save Changes button?

Hi Nikhil,

So this is a bit hacky! Here is an option to go you going!

First, click the "..." button next to the "Share" button and then click on "Scripts and styles" from the drop-down

Screen Shot 2021-06-02 at 2.08.03 PM

Next, click the CSS tab. In the CSS box copy the code below but replace the "table1" with the table name.

._retool-table1 button.ant-btn.ant-btn-primary



Screen Shot 2021-06-02 at 2.27.20 PM

It indeed seems hacky but it does exactly what I was looking for. Thanks for your time and help. Cheers