Skip to content

Commit e3d72fc

Browse files
committed
fix(hgrid): Fix resources not updated from global API.
1 parent 2ff22a9 commit e3d72fc

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
718718

719719
if (this.parent) {
720720
this.childLayoutKeys = this.parentIsland.children.map((item) => item.key);
721+
this._resourceStrings = this.rootGrid._resourceStrings;
721722
}
722723

723724
this.headSelectorsTemplates = this.parentIsland ?
@@ -743,7 +744,6 @@ export class IgxHierarchicalGridComponent extends IgxHierarchicalGridBaseDirecti
743744
this.rootGrid.hasChildrenKey;
744745
this.showExpandAll = this.parentIsland ?
745746
this.parentIsland.showExpandAll : this.rootGrid.showExpandAll;
746-
this.resourceStrings = this.parentIsland?.resourceStrings ?? this.rootGrid.resourceStrings;
747747
}
748748

749749
/**

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,12 @@ export class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective
123123
*/
124124
@Input()
125125
public override set resourceStrings(value: IGridResourceStrings) {
126-
this._resourceStrings = value;
127-
this.rowIslandAPI.getChildGrids().forEach((grid) => {
128-
grid.resourceStrings = value;
129-
});
126+
super.resourceStrings = value;
127+
this.updateGridsResources();
130128
}
131129

132130
public override get resourceStrings() {
133-
return this._resourceStrings ?? this.rootGrid.resourceStrings;
131+
return super.resourceStrings ?? this.rootGrid.resourceStrings;
134132
}
135133

136134
/**
@@ -607,4 +605,10 @@ export class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective
607605
grid.childGridTemplates.clear();
608606
grid.onRowIslandChange();
609607
}
608+
609+
private updateGridsResources() {
610+
this.rowIslandAPI.getChildGrids().forEach((grid) => {
611+
grid.resourceStrings = this.resourceStrings;
612+
});
613+
}
610614
}

0 commit comments

Comments
 (0)