Hi Silvia,
It all depends on your requirement, how you want to use the filter bar control.
If you're using the advanced search like field value search, then you have to place the logic in search event of filter bar control like below -
search: function(oEvent){ var oParams = oEvent.getParameter("selectionSet"); //Get Advanced Search values oCompanyCode = oParams[0].getValue(); //Get Company Code value oCurrencyCode = oParams[1].getValue(); //.... so on... }
If you want to use basic search that is placed on left side, then you can use sap.m.SearchField control and say -
var oFilterBar = new sap.ui.comp.filterbar.FilterBar(); var oSearch = new sap.m.SearchField(); oFilterBar.setBasicSearch(oSearch);
Check this sample: Plunker
Use Basic Search to filter on CompanyCode / CurrencyCode / Company Name. (For this, you have to use KEYBOARDenter OR PRESS on search icon in search field.)
Use Advanced Search (For this, you have to use 'GO' button)
Regards,
Sai Vellanki.