I have an issue with validating cell value and it doesn't work as expected.
What I want to do is validate cell value and keep cell in edit mode if it is invalid. In order to achieve that, I'm trying to handle blur event for an input in <ng-template igxCellEditor>. But blur event is sometimes fired and sometimes not.
Here is a sample
https://stackblitz.com/edit/igx-grid-custom-edit-template
Does my approach make sense? Or is there a better way?
Hello @tkiryu, currently default grid behavior that we provide is the following: when you try to enter edit mode for a specific cell it can be canceled, when the cell is edited you can define only if the value to be submitted or not, but you can not define if the cell to stays in edit mode or to escape. So I logged a new issue(feature-request: #4135) to reconsider this behavior.
Currently I can not suggest you a solution that will work in all cases: Here you can see a sample that fulfill your need on tab and enter, but will not work as expected when you click over another cell.
@ddincheva , thank you for answering and logging a new issue. I understand it's currently impossible to achieve what I'd like to.
Most helpful comment
@ddincheva , thank you for answering and logging a new issue. I understand it's currently impossible to achieve what I'd like to.