Skip to content

Commit f0bac29

Browse files
authored
Merge branch 'master' into bpenkov/date-range-disabled-onpush
2 parents e3410ac + 7c923e8 commit f0bac29

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

+4
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,10 @@ export class IgxGridForOfDirective<T> extends IgxForOfDirective<T> implements On
14931493
NgFor only supports binding to Iterables such as Arrays.`);
14941494
}
14951495
}
1496+
if (this.igxForScrollOrientation === 'horizontal') {
1497+
// in case collection has changes, reset sync service
1498+
this.syncService.setMaster(this, true);
1499+
}
14961500
}
14971501
const defaultItemSize = 'igxForItemSize';
14981502
if (defaultItemSize in changes && !changes[defaultItemSize].firstChange &&

projects/igniteui-angular/src/lib/grids/grid/grid.groupby.spec.ts

+23
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,29 @@ describe('IgxGrid - GroupBy #grid', () => {
975975
expect(rect.top).toEqual(origRect.top);
976976
});
977977

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+
9781001
// GroupBy + Filtering
9791002
it('should filters by the data records and renders their related groups.', fakeAsync(() => {
9801003
const fix = TestBed.createComponent(DefaultGridComponent);

0 commit comments

Comments
 (0)