Workflow Overview:
I am working with a table where I need to implement a user-friendly editing experience. Currently, when a user edits a cell and commits the changes using the standard method (e.g., pressing Enter), the value is successfully updated in the cell. This is working fine using the onEditCellCommit
event.
However, to improve the usability of the table, I want to extend this functionality so that if a user begins editing a cell but then either clicks outside the cell or presses Escape, the typed (or partially typed) value should still be committed, rather than discarding it. This would streamline the interaction, allowing users to make quick changes without explicitly committing them.
What I’ve Learned So Far:
I have reviewed the documentation, and I understand that when the onEditCellCancel
event is triggered, the value captured in the event is the previous value that was in the cell before the editing began. This suggests that when the edit is cancelled, the system reverts to the last known value, discarding any changes made during the edit.
What I’m Trying to Achieve:
I’m wondering if there is a way to override this default functionality to capture the typed (or even partially typed) value on edit cancel, effectively treating it as a commit instead of a cancel. This would mean that the user's edits are preserved even if they don’t formally commit them via pressing Enter.
Any insights or suggestions on how to capture and commit the edited value in these cases would be greatly appreciated!