EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: gordis gmbh on July 15, 2019, 01:30:54 AM



Title: Display combogrid panel automatically when focus is set within the input field
Post by: gordis gmbh on July 15, 2019, 01:30:54 AM
We use a combogrid plugin and our intention is to display the combogrid panel automatically when the user clicks withind the input field.

We extended the combogrid „onLoadSuccess“ event to bind the mousedown with the "showPanel" call.
But the following error is displayed in developer tool.

Uncaught TypeError: Cannot read property 'options' of undefined

How can this problem be fixed and the combogrid panel displayed automatically?

For more details check this example: http://jsfiddle.net/Mohamed_Amor/kyzp5cgn/


Title: Re: Display combogrid panel automatically when focus is set within the input field
Post by: jarry on July 16, 2019, 06:57:31 PM
Bind the 'focus' event handler on the inputing box. Please try this code:
Code:
$('#cg').combogrid({
inputEvents: $.extend({},$.fn.combogrid.defaults.inputEvents, {
focus: function(e){
$(e.data.target).combogrid('showPanel')
}
})
})