Bryntum documentation says to use finalizeCellEdit to check if the value introduced is correct or not. If the introduced value is incorrect, we should return false and the expected behaviour of the cell in this case could be configured using invalidAction.
However, this isn't working properly. If we configure invalidAction with 'revert' or 'block' the editor is not closed and the finalizeCellEdit event is never dispatched again so we can't fix the value of the cell to a new one. That the editor is not closed is great in our case as we also want to show a message error using setError but to be able to fix the cell value is still needed.
Here a video of the error happening with invalidAction as 'revert' on this bryntum demo.
On the video, first, we insert an incorrect value and we fixed it with another incorrect value. Then we insert an incorrect value and we fixed it with a correct value.
To be able to reproduce it, just change the Score column configuration for:
{
text : 'Score',
field : 'score',
editor : 'number',
finalizeCellEdit: ({value, inputField}) =>{
console.log('finalizeCellEdit');
inputField.setError('error message');
return value > 30;
},
invalidAction: 'revert',
width : '5em'
},
Thank you in advance!