Skip to Content
0
Former Member
Jun 14, 2016 at 09:23 PM

sap.m.SearchField not showing oData suggestion items

2970 Views

I have SearchField bound to an oData service. Here's JSBin: JS Bin - Collaborative JavaScript Debugging

<SearchField

type="Text"

enableSuggestions="true"

suggest="onMaterialSuggest"

suggestionItems="{path: 'part>/Parts'}">

<suggestionItems><SuggestionItem text="{part>PartDesc}" description="{data>PartID}" key="{part>PartID}"/></suggestionItems> </SearchField>

onMaterialSuggest contains:

var value = oEvent.getSource().getValue().toUpperCase();

var filters = [];

filters.push(new Filter({

filters: [

new Filter("PartID", Operator.Contains, value.toUpperCase()),

new Filter("PartDesc", Operator.Contains, value.toUpperCase()) ],

and: false })

);


oEvent.getSource().getBinding('suggestionItems').filter(filters);

  • In the console, I can see that the calls are being made and the results look as expected.
  • In the aggregation getAggregation('suggestionItems') I can see that there are items there, the number matching the number of results returned from the oData service.

The suggestion items do not open. I don't mean that there's a blank list, there's just no list. It just displays like an input field. Am I missing anything?