Posted 14 March 2019, 5:16 am EST
Hi,
I define edit template for cell with “wjCellTemplate”, then add handler event “blur” for input element inside of template.
<wj-flex-grid [itemsSource]="itemsSource">
<wj-flex-grid-column header="Sales" binding="amount">
<ng-template wjFlexGridCellTemplate cellType="CellEdit" let-item="item">
<input type="text" (blur)="onLostFocus()"/>
</ng-template>
</wj-flex-grid-column>
<wj-flex-grid-column header="Check" binding="active">
</wj-flex-grid-column>
</wj-flex-grid>
onLostFocus() {
console.log('lost focus');
}
demo online at: http://next.plnkr.co/edit/4NrDKzfAlrbMa9cm
Current: 2 events blur raised on Chrome (bad effectly to my behavior logic).
I check from the block at: wijmo.angular2.grid.js on “DirectiveCellFactory” → “updateCell” function, line 425:
if (u.cellEditEnding.removeHandler(M), !t.stayInEditMode) {
var o = wjcCore.getActiveElement();
[b]o && o.dispatchEvent(p._evtBlur)[/b], i.focus()
}
However, on IE not procedure for this case (1 blur event raised).
Expect: 1 blur event raised on both Chrome & IE.
=> Pls confirm for me, this block is fix blur for IE? Which solution for me!
Tks so much!