Before the version 17 update I was initially filtering the records on the dataBound event. Like this:
<ejs-grid (dataBound)='initFilter()></ejs-grid>
initFilter() {
console.log('bound');
this.filter(this.filterValue);
}
filter(value: string) {
if (value == 'all') {
this.gridObj.clearFiltering();
}
if (value == 'active') {
this.gridObj.filterByColumn('aktiv', 'equal', 'true');
}
if (value == 'inactive') {
this.gridObj.filterByColumn('aktiv', 'equal', 'false');
}
}
Now with the new update, the dataBound event gets fired at least 4 times and when I click on a button which filters let's say active, it tries to bind the data over and over again.
The data itself comes is sent to the grid through the parent component and gets resolved using the async pipe.
I can't reproduce this issue in a fresh Stackblitz project which I know makes it hard for you to help me but maybe somone has an idea how to deal with intial filtering now.
I tried
this.filterOptions = {
type: 'None',
columns: [{ field: 'aktiv', operator: 'equal', value: this.filter(this.filterByValue), predicate: 'and' }]
};
but that fails.
Thanks in advance
Paul