商品数量限制在 100 左右 [英] Number of items limited to around 100

查看:47
本文介绍了商品数量限制在 100 左右的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了以下输入字段.

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}"
    }),
  },
});

城市"数组包含大约 8400 条记录,但是当我输入一些字符时,建议函数似乎只在数组的前 100 项中查找.

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.

我在 jsbin 中创建了一个 示例.如果您尝试查找第一个元素,它会起作用……但是如果您尝试输入最后一个城市,则建议不会出现.

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.

推荐答案

在较新版本的 SAP UI5 中,JSONModel 还支持 setSizeLimit() 方法:

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

model.setSizeLimit(iNumOfYourJsonEntries);

API 说明:设置用于列表绑定的最大条目数."

要小心,因为它可能会导致性能问题.

Be careful because it can lead to performance issues.

这篇关于商品数量限制在 100 左右的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆