EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: kingor2001 on June 21, 2019, 06:17:18 AM



Title: TagBox with Autocomplete is unavailable with limitToList set to false
Post by: kingor2001 on June 21, 2019, 06:17:18 AM
TagBox with Autocomplete is unavailable with "limitToList:false", unless "limitToList:false".
How to enable autocomplete with "limitToList:false"?


Title: Re: TagBox with Autocomplete is unavailable with limitToList set to false
Post by: jarry on June 22, 2019, 07:09:34 AM
You can custom the 'enter' and 'query' handler. Try this code.
Code:
$('#tb').tagbox({
limitToList: false,
keyHandler: $.extend({}, $.fn.tagbox.defaults.keyHandler, {
enter: function(e){
...
},
query: function(q,e){
var opts = $(this).tagbox('options');
if (opts.limitToList){
$.fn.combobox.defaults.keyHandler.query.call(this, q, e);
} else {
$(this).combobox('showPanel');
}
}
})
})