Hi Isomorphic,
We recently upgraded to 8.1 and facing one major issue in search using filter editor.
Our default grid has some basic criteria which we were creating as below and passing that in fetchData method.
var criteria = {
_constructor:"AdvancedCriteria",
operator:"and",
criteria:[
{ fieldName:"state", operator:"inSet", value:["ACTIVE","INACTIVE"]}
]}
Now, we have one more feature that if user open the filter editor we set the default criteria using below api:
this.grid.setShowFilterEditor(true);
this.grid.setFilterEditorCriteria (this.grid.getCriteria());
Now whatever criteria once set using setFilterEditorCriteria can not be cleared and if user change the criteria for the same field it appends the criteria which brings no results:
New criteria will look like below:
criteria:[
{ fieldName:"state", operator:"inSet", value:["ACTIVE","INACTIVE"]},
{ fieldName:"state", operator:"inSet", value:["CANCEL"]},
]}
It's not possible for same record to be either ACTIVE/INACTIVE and CANCEL too. If user change the search of the same field then criteria set through setFilterEditorCriteria should not be appended.
Please let me know if I was not able to explain the issue.
Thanks,
Santosh.
We recently upgraded to 8.1 and facing one major issue in search using filter editor.
Our default grid has some basic criteria which we were creating as below and passing that in fetchData method.
var criteria = {
_constructor:"AdvancedCriteria",
operator:"and",
criteria:[
{ fieldName:"state", operator:"inSet", value:["ACTIVE","INACTIVE"]}
]}
Now, we have one more feature that if user open the filter editor we set the default criteria using below api:
this.grid.setShowFilterEditor(true);
this.grid.setFilterEditorCriteria (this.grid.getCriteria());
Now whatever criteria once set using setFilterEditorCriteria can not be cleared and if user change the criteria for the same field it appends the criteria which brings no results:
New criteria will look like below:
criteria:[
{ fieldName:"state", operator:"inSet", value:["ACTIVE","INACTIVE"]},
{ fieldName:"state", operator:"inSet", value:["CANCEL"]},
]}
It's not possible for same record to be either ACTIVE/INACTIVE and CANCEL too. If user change the search of the same field then criteria set through setFilterEditorCriteria should not be appended.
Please let me know if I was not able to explain the issue.
Thanks,
Santosh.
Comment