Number of items limited to around 100

隐身守侯 提交于 2021-02-19 05:22:10

问题


I've created the following Input field.

var oCityInput = new Input({ // sap/m/Input
  showSuggestion: true,
  showTableSuggestionValueHelp: true,
  suggestionItems:{
    path: "/cities",
    template: new ListItem({ // sap/ui/core/ListItem
      text: "{cname}",
      additionalText: "{provi}"
    }),
  },
});

The "cities" array contains around 8400 record, but when I type some character the suggestion function it seems that is looking for only in the first 100 items of the array.

I've created an example in jsbin. If you try to looking for the first elements it works... but if you try to type the last city the suggestion will not come out.


回答1:


In newer versions of SAP UI5 the JSONModel also supports the setSizeLimit() method:

model.setSizeLimit(iNumOfYourJsonEntries);

API description: "Set the maximum number of entries which are used for list bindings."

Be careful because it can lead to performance issues.



来源:https://stackoverflow.com/questions/37193519/number-of-items-limited-to-around-100

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!