cancel
Showing results for 
Search instead for 
Did you mean: 

Showing busy indicator on sap.m.Input while waiting for suggestions

0 Kudos
861

I have a sap.m.Input on which I have I have a suggest handler as follows, which fetches data from the backend.

handleMaterialSuggest: function (oEvent) {
	var sTerm = oEvent.getParameter("suggestValue");
	var aFilters = [];
	if (sTerm) {
		aFilters.push(new Filter('Matchcode', sap.ui.model.FilterOperator.Contains, sTerm.toUpperCase()))
		aFilters.push(new Filter('MaterialNumber', sap.ui.model.FilterOperator.Contains, sTerm.toUpperCase()))
	}
	var orFilter = new Filter({ filters: aFilters, and: false })
	var oBinding = oEvent.getSource().getBinding("suggestionItems")
	oBinding.filter([orFilter])
	oEvent.getSource().setFilterSuggests(false)
}

I want to set a busy indicator on the control when suggestions are being fetched, and I can do this easily enough with oEvent.getSource().setBusy(), but I don't see any event that I can use to remove the busy indicator when the request returns.

How would I remove a busy indicator once the suggestions have loaded?

venkateswaran_k
Active Contributor
0 Kudos

I remember there are some data received events... May be you can try that

0 Kudos

@ venkateswaran.k Can you be more specific? How do I listen to those events, and only for this control? I don't want to do this for every data received event, only for the suggestion items for this particular input field.

View Entire Topic
maheshpalavalli
Active Contributor
0 Kudos

Thank you Mahesh, that did the trick.