EasyUI Forum
May 08, 2024, 08:23:50 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: Unnecessary calls for combogrid::onHidePanel  (Read 16125 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: September 16, 2013, 03:03:32 AM »

I have found that when I click on any combobox or combotree element on my form I have unnecessary onHidePanel call for my combogrid.
It is not a big problem but for onHidePanel I have a function which updates one of my panels with new 'href'. So every time I click on any combobox I have some kind of blinking due to 'refresh' of this panel.

Below you can find code of the page where this problem is visible.

Thanks in advance!

PS: 'Click' is not use of drop-down. It is simple click into the middle of element.

Code:
<!DOCTYPE html>
<html>
<head>
<title>combogrid problem</title>
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script>
function test(a1){
alert('hello from '+a1+'!');
}
$(function(){
$('#myCombogrid').combogrid({
panelWidth:550,
url: '',
idField:'name',
textField:'name',
columns:[[
{field:'name',title:'name',width:150}
]],
onHidePanel: function(){
test('onHidePanel');
}
});
});
</script>
</head>
<body>
<input id="myCombogrid" style="width:240px" hasDownArrow="false">
<hr>
<select size="1" style="width:110px;" class="easyui-combobox" data-options="editable:false">
<option value='1' >1</option>
<option value='2' >2</option>
<option value='3' >3</option>
</select>
</body>
</html>
« Last Edit: September 16, 2013, 03:14:39 AM by mzeddd » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: September 16, 2013, 06:24:17 AM »

For all the combo components including combobox,combotree and combogrid, when drop-down panel is hidden, the 'onHidePanel' event will be triggered.
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #2 on: September 16, 2013, 07:19:11 AM »

Hi,

Any explanations why this event is triggered for all combo components after an action on one combo?

Possible workaround for me is to use 'keyHandler' from combo but when I define it with only 'enter' function it asks me for 'query' function.
If I define empty 'query' function autocomplete function stops working and I see nothing in the grid.

Can you help me to sort this out?

Thanks
« Last Edit: September 16, 2013, 07:24:41 AM by mzeddd » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: September 16, 2013, 08:36:16 AM »

Please try to download the updated combo plugin from http://www.jeasyui.com/easyui/plugins/jquery.combo.js and include it in the page.
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #4 on: September 17, 2013, 01:08:37 AM »

It works!

Very big thank you!
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!