I’m in the process of developing an invoicing app on Bubble.
Here is what I have set up and working:
Display a list of ‘line_items’ in a RG (Repeating Group).
If the user wants to change a line_item, they can click EDIT enabling the inputs to be edited via custom states within the cell.
After changes are made, the user hits SAVE (within the cell) to trigger a workflow to update the current cell’s line_item.
Here’s what I’m trying to achieve:
Load line_items in the RG (all will be editable).
Users can edit details of these line items (quantity, cost, etc.). However, crucially, these changes should be temporary and not immediately reflect in the database.
Batch Update: Once the user has made all their desired edits, they would click a SAVE button. Only then should all the changes they’ve made be batch-saved to the database, updating all the affected records.
I keep getting hung up accessing data within the RG. Has anyone implemented a similar feature or have ideas on how best to approach this? Your advice and suggestions would be greatly appreciated!
Wouldn’t loading the data into a custom state and referencing those records in the RG instead of referencing the data directly prevent any edits from being saved to DB?
Of course tracking changes to save upon button click can be tedious…