SAPUI5: How to filter data with 2 or more values

前端 未结 9 1256
被撕碎了的回忆
被撕碎了的回忆 2021-02-04 20:51

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         


        
9条回答
  •  梦如初夏
    2021-02-04 21:19

    I achieved this with the below code:-

    var oFilter = new sap.ui.model.Filter("name",sap.ui.model.FilterOperator.Contains,searchString);
    var oFilter1 = new sap.ui.model.Filter("ID",sap.ui.model.FilterOperator.Contains,searchString);
    var comFil = new sap.ui.model.Filter([oFilter,oFilter1]);
    var oList = sap.ui.getCore().byId("dealerList");
    oList.getBinding("items").filter(comFil,sap.ui.model.FilterType.Application);
    

提交回复
热议问题