Question

I have a SearchField with liveChange properties:

<SearchField id="searchField" liveChange="onSearch" width="100%" />

In my controller i manage the live-action:

onSearch : function (oEvt) {

        // add filter for search
        var aFilters = [];
        var sQuery = oEvt.getSource().getValue();
        if (sQuery && sQuery.length > 0) {
          var fileterCol=this.byId("selectSearch789").getSelectedKey();
          var filter = new sap.ui.model.Filter(fileterCol, sap.ui.model.FilterOperator.Contains, sQuery);
          aFilters.push(filter);
        }

        // update list binding
        var tableArtConNom = this.getView().byId("tableResult");
        var binding = tableArtConNom.getBinding("items");
        binding.filter(aFilters, "Application");
    }

But at every char that I write, the cursor return al position 0. For example if I want search HOUSE i write the word but i see ESUOH....

If i use search and not liveChange it work!

Was it helpful?

Solution

There is a solution for you. Please set property of SearchField: selectOnFocus="false".

Please also see the documentation.

Regards, Allen

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top