Hi! I'm not sure this is possible, but I have a table inside a listview and it repeats itself many times in my app (usually 20-30 tables), and the user usually updates values inside each table. And it takes a lot of time to perform a "Save Action" on each table. Maybe there was a way to have the individual changeObjects, and then somehow get a hold of all tables inside the listview and run a bulk update for each ChangeObject/ChangeArray. Thanks in advance!
Hey @Ignacio_Martinez , as far as I am aware we are not able to access listView child components outside of the listView, but I think I found a hacky workaround for your problem.
You can add a "Change Cell" eventHandler to your table to store all changes in one variable, something like this:
const tableChangeSet = myTable.changesetArray.map(c => ({...c, tableIndex: i}));
const allChanges = [
...tableChangeSet,
...listViewChanges.value.filter(change => change.tableIndex !== i),
]
listViewChanges.setValue(allChanges);
In your update query you can then reference allChanges
variable.
However I did not yet figure out how to clear the Changeset of all tables after running the update query. But maybe this helps you as a starting point!
Thanks, is there a way to capture the "Cancel" button that shows up after I change a cell?
I want to leave the option of updating a single table, aside from doing a bulk update.
Say you update a row in table[0], then another in table[1], table[2], but you change your mind and leave table[0] unedited (clicking on Cancel button for that table).
It doesn't look like we have an event to capture cancels yet
You can remove the cancel/save functionality entirely by clicking the "x", and then handling the saves in another way: