EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: zombie86 on January 15, 2022, 04:09:10 AM



Title: combotree limittolist
Post by: zombie86 on January 15, 2022, 04:09:10 AM
Dear All,

hope you doing well, and wish you a good day too.

I would like to ask if I can apply limitToList Property, since I need to force only tree items to be selected

combotree has editable property with filter and it has keyboard navigation

your help is highly appreciated


Title: Re: combotree limittolist
Post by: jarry on January 16, 2022, 07:49:28 PM
Please override the 'blur' event handler to achieve this feature.
Code:
$('#cc').combotree({
inputEvents: $.extend({}, $.fn.combo.defaults.inputEvents, {
blur: function(e){
var target = e.data.target;
var val = $(target).combotree('getValue');
$(target).combotree('setValue', val)
}
})
})


Title: Re: combotree limittolist
Post by: zombie86 on January 28, 2022, 08:56:36 AM
thanks Jarry, it worked as expected  :-*