I always get: "TypeError: $.data(...) is undefined" when trying to clear or unselect item in combobox (combotree in my case).
<input id="parent_id" class="easyui-combotree form-control" name="parent_id" data-options="prompt:'<?=__('Select Parent')?>'">
var parent = $('#parent_id').combotree({
url: baseUrl+'admin/pagesrest/pages_combotree',
inputEvents: $.extend({}, $.fn.combo.defaults.inputEvents, {
keyup:function(e){
if(e.keyCode == 46 || e.keyCode == 8){
var value = $('#parent_id').combobox('getText'); // the item value to be selected
$('#parent_id').combobox('unselect', value);
}
}
}),
icons:[{
iconCls: 'icon-clear',
handler:function(e){
parent.combobox('clear');
}
}]
});