onEditorChange is suppressing the button click event.

Hi,
I am facing an issue in datatable editor, If i remove the content of the editor and click of the button, button click doesn’t fire. Please have a look at code snippet Code Snippet.
Please suggest the solution for this behavior.

Expectation: Delete the content from the editing column (Reason column as per the snippet) and click on either of the button (Apply all or Apply empty). Data has to reflect in the grid.

Thanks,
Ranjith G.

Hello,

In fact, the button click event fires as expected. But at the same time, button click causes editor blurring, which in turn updates the Datatable with the current editor value. And it may happen later than a custom value is set.

To prevent this collision, you need to call the Datatable’s editStop() method to close the editor and apply its value before the custom logic runs:

function onApplyEmpty(){	
  $$('rfcgrid').editStop();
  $$('rfcgrid').eachRow(...);
}