【发布时间】:2017-06-06 18:43:40
【问题描述】:
我正在使用 bootstrap3 typeahead,但在某些情况下,我的 API 返回了很多结果(大约 40 个),但 typeahead 只弹出 8 个结果。
我试图解决这个问题
limit: 30
但是没有用。
如何更改它以显示超过 8 个结果?
顺便说一句,我的输入是
$('#postcode').typeahead({
source: function (query, process) {
var ajaxResponse;
$.ajax({
url: "my_url",
type: "GET",
cache: false,
success : function (response) {
process(response.addresses);
}
});
},
limit: 30,
minLength: 2,
displayText: function(item) {
return item.full_description;
},
updater: function(item) {
// some func here
return item;
}
});
【问题讨论】:
标签: twitter-bootstrap-3 bootstrap-typeahead