Quantcast
Channel: SCN: Message List - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 8124

Re: SAPUI5 search on DataSet

$
0
0

One way to do that is to create a new search object

 

sap.ui.commons.SearchField

 

and implement the attachSuggest method

 

something like this

 

var search = new sap.ui.commons.SearchField(

         "mySearch", {

          enableListSuggest : false,

          enableClear : true,

          startSuggestion : 0,

          value :  "Search"

         });

 

search.attachSuggest(function(oEvent) {

        oController._searchMe(oEvent

          .getParameter("value"));

       }, oController)

 

in controller

_searchMe = function (query) {

     //get DS object and apply the filter you mentioned above

     //filtering will be triggered be on a keystroke

}

 

 

 


Viewing all articles
Browse latest Browse all 8124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>