EasyUI Forum

General Category => Bug Report => Topic started by: mzeddd on September 16, 2013, 03:03:32 AM



Title: Unnecessary calls for combogrid::onHidePanel
Post by: mzeddd 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>


Title: Re: Unnecessary calls for combogrid::onHidePanel
Post by: stworthy 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.


Title: Re: Unnecessary calls for combogrid::onHidePanel
Post by: mzeddd 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


Title: Re: Unnecessary calls for combogrid::onHidePanel
Post by: stworthy 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.


Title: Re: Unnecessary calls for combogrid::onHidePanel
Post by: mzeddd on September 17, 2013, 01:08:37 AM
It works!

Very big thank you!