Posted 23 January 2020, 3:01 am EST
Hi Team,
I am using angular 4 with wijmo. I have a “wj-flex-grid” inside that I have “wj-flex-grid-filter”. I am using the column filters and they are working fine on their own. Our users use 1 filter very often so we have to put in a checkbox and if the user clicks that checkbox that filter is applied to the grid. Now this checkbox is working as well. But when I use the checkbox filter the column filter on the grid stops working. What I want to do is first apply the checkbox filter and then apply the column filter to narrow the the list more.
So basically when I apply custom filter the built in filters stops working. I know there is another post on this issue but I didn’t understand the example provided in that forum.
<input
type="checkbox"
name="BUSINESS_LINE_2019"
(change)="filterCoverage($event)"
/> BUSINESS_LINE_2019
<wj-flex-grid [itemsSource]="data" [frozenColumns]="1" #flex>
<wj-flex-grid-filter #gridFilter>
</wj-flex-grid-filter>
<wj-flex-grid-column
[width]="'2.5*'"
header="Document Name"
binding="documentNm">
</wj-flex-grid-column>
<wj-flex-grid-column
[width]="'1.5*'"
header="Sub-Type"
binding="documentSubTypeCd.code">
</wj-flex-grid-column>
filterCoverage(e){
console.log(e)
let filter = (<HTMLInputElement>e.target).name.toLowerCase();
this.flex.collectionView.filter = (item: any) => {
return filter.length == 0 || !e.target.checked || item.documentSubTypeCd.code.toLowerCase().indexOf(filter) > -1
}
}