Skip to content

Commit 6299662

Browse files
authored
Merge pull request #7482 from IgniteUI/dkamburov/fix-6860
fix(hgrid): Expose onGridInitialized output #6860
2 parents 985d8d1 + e0f7f00 commit 6299662

File tree

5 files changed

+29
-1
lines changed

5 files changed

+29
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes for each version of this project will be documented in this file.
44

5+
## 9.1.1
6+
7+
### General
8+
- `IgxHierarchicalGrid`
9+
- `onGridInitialized` - New output has been exposed. Emitted after a grid is being initialized for the corresponding row island.
10+
511
## 9.1.0
612

713
### General

projects/igniteui-angular/src/lib/grids/hierarchical-grid/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ Below is the list of all inputs that the developers may set to configure the gri
177177
|--- |--- |
178178
|_Event emitters_|_Notify for a change_|
179179
| onGridCreated | Emitted when a grid is being created for this row island | false | parentRecord: `any`, owner: `IgxRowIslandComponent`, grid: `IgxHierarchicalGridComponent` |
180+
| onGridInitialized | Emitted after a grid is being initialized for this row island. The emitting is done in `ngAfterViewInit` | false | parentRecord: `any`, owner: `IgxRowIslandComponent`, grid: `IgxHierarchicalGridComponent` |
180181

181182

182183
### Properties

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ private resolver;
160160
this.parentGrid.hgridAPI.registerChildGrid(this.rowData.rowID, this.layout.key, this.hGrid);
161161
this.layout.rowIslandAPI.registerChildGrid(this.rowData.rowID, this.hGrid);
162162

163+
this.layout.onGridInitialized.emit({
164+
owner: this.layout,
165+
parentID: this.rowData.rowID,
166+
grid: this.hGrid
167+
});
168+
163169
this.hGrid.cdr.detectChanges();
164170
}
165171

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ export class IgxHGridRemoteOnDemandComponent {
13751375
setTimeout(() => {
13761376
event.grid.data = this.generateRowIslandData(5);
13771377
event.grid.cdr.detectChanges();
1378-
}, 1000);
1378+
});
13791379
}
13801380
}
13811381

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,21 @@ export class IgxRowIslandComponent extends IgxHierarchicalGridBaseDirective
138138
@Output()
139139
public onGridCreated = new EventEmitter<IGridCreatedEventArgs>();
140140

141+
/**
142+
* Emitted after a grid is being initialized for this row island.
143+
* The emitting is done in `ngAfterViewInit`.
144+
* ```html
145+
* <igx-hierarchical-grid [data]="Data" [autoGenerate]="true">
146+
* <igx-row-island [key]="'childData'" (onGridInitialized)="gridInitialized($event)" #rowIsland>
147+
* <!-- ... -->
148+
* </igx-row-island>
149+
* </igx-hierarchical-grid>
150+
* ```
151+
* @memberof IgxRowIslandComponent
152+
*/
153+
@Output()
154+
public onGridInitialized = new EventEmitter<IGridCreatedEventArgs>();
155+
141156
/**
142157
* @hidden
143158
*/

0 commit comments

Comments
 (0)