EasyUI Forum
July 05, 2024, 07:14:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: TagBox with Autocomplete is unavailable with limitToList set to false  (Read 2525 times)
kingor2001
Jr. Member
**
Posts: 61


View Profile
« 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"?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2269


View Profile Email
« Reply #1 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');
}
}
})
})
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!