File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -508,7 +508,9 @@ class GridElement extends ElementMixin(
508
508
}
509
509
510
510
if ( this . _columnTree ) {
511
- this . _columnTree [ this . _columnTree . length - 1 ] . forEach ( ( c ) => c . notifyPath && c . notifyPath ( '_cells.*' , c . _cells ) ) ;
511
+ this . _columnTree [ this . _columnTree . length - 1 ] . forEach (
512
+ ( c ) => c . isConnected && c . notifyPath && c . notifyPath ( '_cells.*' , c . _cells )
513
+ ) ;
512
514
}
513
515
514
516
beforeNextRender ( this , ( ) => {
Original file line number Diff line number Diff line change @@ -552,4 +552,13 @@ describe('column', () => {
552
552
expect ( column . _bodyTemplate ) . to . eql ( template2 ) ;
553
553
} ) ;
554
554
} ) ;
555
+
556
+ it ( 'should not throw an exception when size is changed after removing column' , ( ) => {
557
+ expect ( grid . size ) . to . equal ( 10 ) ;
558
+ expect ( column . isConnected ) . to . be . true ;
559
+ column . remove ( ) ;
560
+ expect ( column . isConnected ) . to . be . false ;
561
+ expect ( ( ) => ( grid . size = 11 ) ) . not . to . throw ( ) ;
562
+ expect ( grid . size ) . to . equal ( 11 ) ;
563
+ } ) ;
555
564
} ) ;
You can’t perform that action at this time.
0 commit comments