File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
projects/igniteui-angular/src/lib Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1493,6 +1493,10 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
1493
1493
NgFor only supports binding to Iterables such as Arrays.` ) ;
1494
1494
}
1495
1495
}
1496
+ if ( this . igxForScrollOrientation === 'horizontal' ) {
1497
+ // in case collection has changes, reset sync service
1498
+ this . syncService . setMaster ( this , true ) ;
1499
+ }
1496
1500
}
1497
1501
const defaultItemSize = 'igxForItemSize' ;
1498
1502
if ( defaultItemSize in changes && ! changes [ defaultItemSize ] . firstChange &&
Original file line number Diff line number Diff line change @@ -975,6 +975,29 @@ describe('IgxGrid - GroupBy #grid', () => {
975
975
expect ( rect . top ) . toEqual ( origRect . top ) ;
976
976
} ) ;
977
977
978
+ it ( 'should obtain correct virtualization state after all groups are collapsed and column is resized.' , ( ) => {
979
+ const fix = TestBed . createComponent ( DefaultGridComponent ) ;
980
+ const grid = fix . componentInstance . instance ;
981
+ grid . groupsExpanded = false ;
982
+ grid . columnWidth = '200px' ;
983
+ fix . detectChanges ( ) ;
984
+
985
+ let fDataRow = grid . dataRowList . toArray ( ) [ 0 ] ;
986
+ expect ( fDataRow . virtDirRow . sizesCache [ 1 ] ) . toBe ( 200 ) ;
987
+
988
+ grid . groupBy ( { fieldName : 'Released' , dir : SortingDirection . Desc , ignoreCase : false } ) ;
989
+ fix . detectChanges ( ) ;
990
+
991
+ grid . columns [ 0 ] . width = '500px' ;
992
+ fix . detectChanges ( ) ;
993
+ const groupRows = grid . groupsRowList . toArray ( ) ;
994
+ groupRows [ 0 ] . toggle ( ) ;
995
+ fix . detectChanges ( ) ;
996
+
997
+ fDataRow = grid . dataRowList . toArray ( ) [ 0 ] ;
998
+ expect ( fDataRow . virtDirRow . sizesCache [ 1 ] ) . toBe ( 500 ) ;
999
+ } ) ;
1000
+
978
1001
// GroupBy + Filtering
979
1002
it ( 'should filters by the data records and renders their related groups.' , fakeAsync ( ( ) => {
980
1003
const fix = TestBed . createComponent ( DefaultGridComponent ) ;
You can’t perform that action at this time.
0 commit comments