Prior to ag-Grid v23 the cellValueChanged event was fired whenever cell editing finished regardless of whether the cell value was actually changed. However, this is no longer the case staring with ag-Grid v23 - the cellValueChanged event is no longer fired if you have not changed the value of the grid cell. Instead, it's only fired when you've changed the cell value.
You can see this cellValueChanged behavior documented here:
https://www.ag-grid.com/documentation/javascript/cell-editing/#event-cell-value-changed
If you had any logic in the cellValueChanged event handler and you counted on it called each time cell editing ends, there's an easy way to make that work with ag-Grid v23 and more recent versions. Instead of cellValueChanged, please add your logic to the event handler of the onCellEditingStopped event. This will ensure it gets executed every time cell editing ends.
This is shown in the sample below:
https://plnkr.co/edit/ey4xVGzpklU6rsBZ
In the sample above, open the dev console and edit cells (alternatively changing and not changing the cell value) to see that the cellEditingStopped event gets fired each time cell editing ends (regardless of whether the cell value has changed), while cellValueChanged gets fired only when the cell value was changed.
Comments
1 comment
This is a hack around a bug. It would be better to fix this bug and add functionality to match the desired function above.
Please sign in to leave a comment.