Hello, I just noticed that if I call FilterBuilder.setCriteria, the filterChanged handler is called multiple times, I wonder if it's by design, or if it's a bug.
Test case (same behaviour with latest 13.1, 13.0, 12.1):
with this criteria, I see 4 calls (and fetches).
Test case (same behaviour with latest 13.1, 13.0, 12.1):
Code:
isc.ListGrid.create({ ID: "countryList", width: 700, height: 224, dataSource: worldDS, fields: [ {name: "countryName"}, {name: "continent"}, {name: "population"}, {name: "area"}, {name: "gdp"}, {name: "independence", width: 100} ] }) isc.FilterBuilder.create({ ID: "advancedFilter", dataSource: "worldDS", filterChanged: function () { isc.logEcho('filterChanged') countryList.filterData(this.getCriteria()); } }); isc.IButton.create({ ID: "filterButton", title: "Filter", click: function () { advancedFilter.setCriteria( { _constructor: "AdvancedCriteria", operator: "and", criteria: [ {fieldName: "continent", operator: "equals", value: "Europe"}, { operator: "or", criteria: [ {fieldName: "countryName", operator: "iEndsWith", value: "land"}, {fieldName: "population", operator: "lessThan", value: 3000000} ] } ] }) } }) isc.VStack.create({ membersMargin: 10, members: [advancedFilter, filterButton, countryList] })
Comment