I want to be able to edit the values in a table through button interactions. Is this possible?
For example, can I attach behavior to my buttons (Approve, Roads, Geometry, ... ) that will populate the table's "reviewed" column upon being pressed?
The purpose of my app is for users to be able to quickly view an image and then assign it to one of several categories. Needing to go row by row clicking drops downs is prohibitively slow.
I can attach the buttons to an update query back to the source database, but pushing these updates line by line is a no go -- as it reduces speed. I want these edits to be available in the recordUpdates property so I can bulk insert every x records edited.
Anything I'm missing here? Any help is immensely valuable.
You would have to count the number of changes being made and then run a query that will update those rows that are updated (Maybe by index?) but I don't think that's a great idea because the table will reload once the bulk updates are completed or at least should reload so that the changes can be viewed.
I'm not sure I explained correctly. What I want to know is can I use a button to set a column value in my table in Retool? I don't want to have to edit values in my table via dropdowns within the table. But rather have a user click a button on the UI which updates the table in realtime.
After, say 20 edits, I'd then insert back to the database with these changes and reload the table with what remains. I know how to write out to the databases via SQL inserts and recordUpdates indexes, so this isn't a concern.
I guess you could take the initial data set and set the entire table into a temp state variable and render that data into a table component. Then when a user edits the table component cell it will update the values (using setIn()Temporary state) in the temp state data. And then you can run a bulk update(Your button) using the new temp data