File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -534,7 +534,10 @@ export const InlineEditingMixin = (superClass) =>
534534 const item = this . __getRowItem ( row ) ;
535535 if ( this . __edited ) {
536536 const { cell, model } = this . __edited ;
537- if ( cell . parentNode === row && this . getItemId ( model . item ) !== this . getItemId ( item ) ) {
537+ if ( ! this . _isCellEditable ( cell ) ) {
538+ // Cell is no longer editable, cancel edit
539+ this . _stopEdit ( true , true ) ;
540+ } else if ( cell . parentNode === row && this . getItemId ( model . item ) !== this . getItemId ( item ) ) {
538541 this . _stopEdit ( ) ;
539542 }
540543 }
@@ -570,15 +573,7 @@ export const InlineEditingMixin = (superClass) =>
570573 }
571574 // Otherwise, check isCellEditable function
572575 const model = this . __getRowModel ( cell . parentElement ) ;
573- const isEditable = column . isCellEditable ( model ) ;
574-
575- // Cancel editing if the cell is currently edited one and becomes no longer editable
576- // TODO: should be moved to `__updateRow` when Grid connector is updated to use it.
577- if ( this . __edited && this . __edited . cell === cell && ! isEditable ) {
578- this . _stopEdit ( true , true ) ;
579- }
580-
581- return isEditable ;
576+ return column . isCellEditable ( model ) ;
582577 }
583578
584579 /**
You can’t perform that action at this time.
0 commit comments