#891 Add onEditorSubmit and onEditorCancel callbacks for Column & BodyCell #892
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Minor Feature Request.
Added onEditorSubmit onEditorCancel callbacks for Column BodyCell.
Does not disturb any existing logic.
Esc closes editor and calls onCancel, otherwise when switching to ViewMode calls onSubmit.
Studying the existing logic for editorValidatorEvent and editorValidator is odd.
If you tab to the next editable cell, the previous editor will never close. And the behavior, is the same regardless of "click" or "blur", if you click away, it's switched to view via the click event, or blur, which is also triggered at the same point.
Main point is there's no way to trigger a cancel to an edit. The closeEditingCell() in DataTable.js is helpful, but just triggers a close. There's no way for a user to not submit typed data unless you use the editorValidator method to revert the data in the case of invalid data, but that's not good, as that method should be for validation only, not submitting.
Also in the case that you've opened more than one editor via invalid data + tab, you can't edit the previous cell because whenever the grid-data updates it focuses on the last open editor due to: