Skip to content

Commit 335a56b

Browse files
authored
chore(hgrid): Avoid circular deps in hgrid remote sample (#10567)
1 parent ac03870 commit 335a56b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/hierarchical-grid-remote-virtualization/hierarchical-remote.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ export class HierarchicalRemoteService {
1717
public url = `https://services.odata.org/V4/Northwind/Northwind.svc/Products`;
1818
public urlBuilder;
1919

20-
constructor(private http: HttpClient, private hierarchyPipe: IgxGridHierarchicalPipe) {
20+
private hierarchyPipe: IgxGridHierarchicalPipe = null;
21+
22+
constructor(private http: HttpClient) {
2123
this._remoteData = new BehaviorSubject([]);
2224
this.remoteData = this._remoteData.asObservable();
2325
}
@@ -43,6 +45,7 @@ export class HierarchicalRemoteService {
4345
}
4446

4547
public getData(virtualizationState: any, grid: IgxHierarchicalGridComponent, cb?: (any) => void) {
48+
this.hierarchyPipe = this.hierarchyPipe ?? new IgxGridHierarchicalPipe(grid);
4649
return this.http.get(this.buildUrl(virtualizationState, grid)).pipe(
4750
map(response => response),
4851
)

0 commit comments

Comments
 (0)