Bulk Deleting selected rows in table

Hi I am currently trying to create an app where the user can select either a single row or multiple rows, then press a delete button. The data is coming from Retools database.

See a screenshot below of the format of this.

How would i go about setting this up with js and queries?

Hi @benmckeown,

The Table wouldn't directly handle the backspace button press. The page could.

Check out Custom Shortcuts. The script you run when you press backspace could modify the DB (not shown). The success of the DB query could trigger a re-run of the query used by the Table.

Hi Dan,

Thank you for your response. Would it be possible if you could share the script to run to modify the DB? I'm currently using retools DB so will need to make sure the script is pointing towards this

Hey @benmckeown! How are you currently attempting to delete this data from the Retool DB? You likely just need a Retool DB resource query, which should have GUI mode so that you don't have to write raw SQL if you don't want to. Happy to help you through any issues you are facing with your code :grinning:

Hi @benmckeown , I don't have the exact setup you'd need and I'm not sure it's a good idea because you might want to press backspace somewhere else on the page.

Do you have a data source hooked up as a Resource? You'll create a Query to update that same resource (probably with a button instead of backspace).