EasyUI Forum
April 27, 2024, 03:20:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Display combogrid panel automatically when focus is set within the input field  (Read 2643 times)
gordis gmbh
Full Member
***
Posts: 103


View Profile Email
« 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/
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 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')
}
})
})
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!