I\'m currently trying some stuff with/in SAPUI5 and I\'ve implemented a very simple search like this:
var filters = [];
var query = evt.getParameter(\"qu
According to the API
For manual filtering you should always pass the FilterType
If you change your code to
list.getBinding("items").filter(filters, sap.ui.model.FilterType.Application);
it should work.
See also https://openui5.hana.ondemand.com/docs/guide/BindingAggregations.html at the very bottom.
Simple way to bind two or more filters.
var sQuery = oEvent.getParameter("value");
var oBinding = oEvent.getSource().getBinding("items");
oBinding.filter([
new sap.ui.model.Filter("column A", sap.ui.model.FilterOperator.Contains, sQuery),
new sap.ui.model.Filter("column B", sap.ui.model.FilterOperator.Contains, sQuery)
]);
var afilters = [];
var query = evt.getParameter("query");
afilters.push(new sap.ui.model.Filter("name", sap.ui.model.FilterOperator.Contains, query);
afilters.push(new sap.ui.model.Filter("age", sap.ui.model.FilterOperator.Contains, query);
var list = this.getView().byId("list");
var binding = list.getBinding("items");
binding.filter(new sap.ui.model.Filter({filters: afilters, and: true|false}));