gpt4 book ai didi

javascript - ngTags 输入 : How to show all results in autocompete?

转载 作者:行者123 更新时间:2023-11-30 16:04:06 25 4
gpt4 key购买 nike

我正在使用 ngTagsInput这是我的标记:

<tags-input add-from-autocomplete-only="true" 
input-tabindex="4"
min-length="0"
ng-model="news.tags"
display-property="tagName"
replace-spaces-with-dashes="false" placeholder="Add tag">
<auto-complete load-on-focus="true"
load-on-empty="true"
min-length="0"
source="loadData('Tag', $query)">
</auto-complete>
</tags-input>

我只能看到 10 个结果,但我需要看到所有结果。

最佳答案

如前所述on the docs ,您可以使用 maxResultsToShow 选项设置一次显示多少个匹配项:

<auto-complete load-on-focus="true" 
load-on-empty="true"
min-length="0"
source="loadData('Tag', $query)"
max-results-to-show="20">
</auto-complete>

Working Plunker

FWIW,您的标记告诉我您正在使用 ngTagsInput 的 fork /自定义版本,因为指令不知道 input-tabindex 属性。不过,我的回答应该仍然适用。

关于javascript - ngTags 输入 : How to show all results in autocompete?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37281725/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com