Event when multiple cells are updated? #94
-
Is there a way of knowing when multiple cells are updated? Use case: The data we are displaying in our table is stored remotely and we are trying to minimize the number of times the data is saved. Currently, we set the row data to a state variable, then listen to onBlur events for when to save the data to our server. But blur events don't happen when cells are added, etc. I do see all the data change in the onChange event, but other than comparing the original to the updated change, I have no way of knowing if one cell was changed, or many. My worry is, on a large table, doing a deep check of the array will be very slow. Not sure the best solution in this case. Perhaps a delta in the onChange event, or even just a value indicating the type (input, paste, duplication, new row, etc)? Are there any methods or callbacks I am not considering to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey @chuckurbis , Now to elaborate, there are many ways as you said to update cells, copy-pasting, editing, deleting cells, deleting rows, expanding selection, inserting rows... Another very important thing to consider is that the underlying data does not have to match the concept of cells, you can have multiple cells impacting the same key of your object, or have a cell impact multiple keys. But doing this with rows sounds feasible as there is a 1 to 1 relationship between the data and the rows displayed. Maybe we could add a second parameter to the |
Beta Was this translation helpful? Give feedback.
-
This is now available in 3.4.0, please read the doc for |
Beta Was this translation helpful? Give feedback.
This is now available in 3.4.0, please read the doc for
onChange