Skip to content

Commit becee5a

Browse files
committed
chore(*): fix sample when filtering is cleared
1 parent 73f9e8c commit becee5a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/app/hierarchical-grid-remote/hierarchical-grid-remote.sample.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,13 @@ export class HierarchicalGridRemoteSampleComponent implements OnInit {
9898
}
9999

100100
public advancedFilteringExprTreeChange() {
101-
if (!this.hGrid.advancedFilteringExpressionsTree) return;
101+
let tree = this.hGrid.advancedFilteringExpressionsTree;
102+
if (!tree) {
103+
tree = new FilteringExpressionsTree(0, undefined, this.remoteEntities[0].name, this.remoteEntities[0].fields.map(f => f.field));
104+
}
102105

103106
this.hGrid.isLoading = true;
104-
this.http.post(`${API_ENDPOINT}/QueryBuilder/ExecuteQuery`, this.hGrid.advancedFilteringExpressionsTree).subscribe(data =>{
107+
this.http.post(`${API_ENDPOINT}/QueryBuilder/ExecuteQuery`, tree).subscribe(data =>{
105108
console.log('data', data);
106109
this.remoteData = Object.values(data)[0];
107110
this.hGrid.isLoading = false;

0 commit comments

Comments
 (0)