@@ -2077,6 +2077,53 @@ export class IgxGridAdvancedFilteringBindingComponent extends BasicGridComponent
20772077 }
20782078}
20792079
2080+ @Component ( {
2081+ template : `
2082+ <igx-grid [data]="data" height="500px" [allowAdvancedFiltering]="true" [(advancedFilteringExpressionsTree)]="filterTree">
2083+ <igx-column width="100px" [field]="'ID'" [header]="'ID'" [hasSummary]="true" [filterable]="false" [resizable]="resizable">
2084+ </igx-column>
2085+ <igx-column width="100px" [field]="'ProductName'" [filterable]="filterable" [resizable]="resizable" dataType="string"></igx-column>
2086+ <igx-column width="100px" [field]="'Downloads'" [filterable]="filterable" [resizable]="resizable" dataType="number"></igx-column>
2087+ <igx-column width="100px" [field]="'Released'" [filterable]="filterable" [resizable]="resizable" dataType="boolean"></igx-column>
2088+ </igx-grid>` ,
2089+ imports : [ IgxGridComponent , IgxColumnComponent ]
2090+ } )
2091+ export class IgxGridAdvancedFilteringSerializedTreeComponent extends BasicGridComponent implements OnInit {
2092+ public resizable = false ;
2093+ public filterable = true ;
2094+ public filterTree : IFilteringExpressionsTree ;
2095+
2096+ public override data = SampleTestData . excelFilteringData ( ) ;
2097+
2098+ public ngOnInit ( ) : void {
2099+ this . filterTree = JSON . parse ( `{
2100+ "filteringOperands": [
2101+ {
2102+ "conditionName": "greaterThan",
2103+ "fieldName": "Downloads",
2104+ "searchVal": 200
2105+ }
2106+ ],
2107+ "operator": 0
2108+ }` ) ;
2109+ // this.filterTree = JSON.parse(`{
2110+ // "filteringOperands": [
2111+ // {
2112+ // "conditionName": "greaterThan",
2113+ // "condition":{
2114+ // "name":"greaterThan",
2115+ // "isUnary":false,
2116+ // "iconName":"filter_greater_than"
2117+ // },
2118+ // "fieldName": "Downloads",
2119+ // "searchVal": 200
2120+ // }
2121+ // ],
2122+ // "operator": 0
2123+ // }`);
2124+ }
2125+ }
2126+
20802127@Component ( {
20812128 template : `
20822129 <igx-grid [data]="data" width="300px" height="250px">
0 commit comments