Skip to content

Commit 23801fa

Browse files
authored
Merge branch 'master' into mkirova/fix-6701-master
2 parents 60be07c + bf899d5 commit 23801fa

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_toast.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ $_bootstrap-toast: extend(
5656
(
5757
variant: 'bootstrap',
5858
background: #fff,
59+
60+
text-color: (
61+
igx-color: ('grays', 600)
62+
)
5963
)
6064
);
6165

projects/igniteui-angular/src/lib/grids/grid-base.directive.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,6 +2468,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
24682468
private _unpinnedWidth = NaN;
24692469
private _visibleColumns = [];
24702470
private _columnGroups = false;
2471+
private _autoGeneratedCols = [];
24712472
protected _headerFeaturesWidth = NaN;
24722473

24732474
private _columnWidth: string;
@@ -4550,6 +4551,12 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
45504551
*/
45514552
protected onColumnsChanged(change: QueryList<IgxColumnComponent>) {
45524553
const diff = this.columnListDiffer.diff(change);
4554+
if (this.autoGenerate && this.columnList.length === 0 && this._autoGeneratedCols.length > 0) {
4555+
// In Ivy if there are nested conditional templates the content children are re-evaluated
4556+
// hence autogenerated columns are cleared and need to be reset.
4557+
this.columnList.reset(this._autoGeneratedCols);
4558+
return;
4559+
}
45534560
if (diff) {
45544561
let added = false;
45554562
let removed = false;
@@ -4779,6 +4786,7 @@ export class IgxGridBaseDirective extends DisplayDensityBase implements
47794786
ref.changeDetectorRef.detectChanges();
47804787
columns.push(ref.instance);
47814788
});
4789+
this._autoGeneratedCols = columns;
47824790

47834791
this.columnList.reset(columns);
47844792
if (data && data.length > 0) {

projects/igniteui-angular/src/lib/grids/hierarchical-grid/hierarchical-grid.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
417417
protected onColumnsChanged(change: QueryList<IgxColumnComponent>) {
418418
this.updateColumnList();
419419
const cols = change.filter(c => c.gridAPI.grid === this);
420-
if (cols.length > 0) {
420+
if (cols.length > 0 || this.autoGenerate) {
421421
this.columnList.reset(cols);
422422
super.onColumnsChanged(this.columnList);
423423
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,8 +1080,7 @@ describe('IgxHierarchicalGrid Runtime Row Island change Scenarios #hGrid', () =>
10801080
hierarchicalGrid = fixture.componentInstance.hgrid;
10811081
}));
10821082

1083-
xit('should allow changing row islands runtime in root grid.', () => {
1084-
pending('Related to issue #6731');
1083+
it('should allow changing row islands runtime in root grid.', () => {
10851084
const row = hierarchicalGrid.getRowByIndex(0) as IgxHierarchicalRowComponent;
10861085
UIInteractions.clickElement(row.expander);
10871086
fixture.detectChanges();

0 commit comments

Comments
 (0)