I am working on an editable table in Angular application with ag-grid library. I would like to keep editing cells (in full row edit mode) until I finish with it and then close the editors manually via API. The problem is that the editor is closing on other cell click/focus (on some other line) as described here:
The grid will stop editing when any of the following happen:
- Other Cell Focus: If focus in the grid goes to another cell, the editing will stop.
I cannot figure out how to disable this, if it is possible. Installing the onCellMouseDown()
hook does not help, because the cellFocused
event is fired before cellMouseDown
. Therefore, the editing stops before I have a chance to intercept the mousedown
event.
Here is my stackblitz little extract with related pieces of code.
The need for such scenario is that I want to validate the entry and not to allow a used to quit the editing if the form is not valid. The only workaround I found so far is that on any click outside of editing cells when the editor closing I reopen it right away in onRowEditingStopped()
hook unless the editor has been closed via 'OK' button.
this.gridApi.redrawRows();
It helped me a little, although I still can't avoid focusing on another cell. – Tiffinytiffy