EasyUI Forum
May 03, 2024, 03:16:41 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: 1.3.6 menu: There is no panel size update after menu option hide/show  (Read 10842 times)
mzeddd
Full Member
***
Posts: 223



View Profile
« on: April 10, 2014, 03:24:21 AM »

Lets have menu like this

Code:
<div id="myMenu" style="width:150px;">
  <div onclick="">Menu1</div>
  <div onclick="">Menu2</div>
  <div onclick="">Menu3</div>
  <div onclick="">Menu4</div>
  <div onclick="">Menu5</div>
</div>

It has 5 menu options.

If I call

Code:
$($('#myMenu').menu('findItem','Menu1').target).hide();
Menu1 should disapper and menu itself should be resized to fit 4 options instead of 5.

In 1.3.6 I see this kind of resize in not called and menu appears with empty space at the end of menu.
In 1.3.5 this problem is not visible.

See attached picture
« Last Edit: April 10, 2014, 05:33:26 AM by mzeddd » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: April 10, 2014, 07:40:27 AM »

Please download the patch file from http://www.jeasyui.com/download/downloads/jquery-easyui-1.3.6-patch.zip.

To hide a menu item, please call 'hideItem' method instead.
Code:
var m = $('#myMenu');
var item = m.menu('findItem', 'Menu1');
m.menu('hideItem', item.target);
Logged
mzeddd
Full Member
***
Posts: 223



View Profile
« Reply #2 on: April 10, 2014, 09:03:29 AM »

This patch fixes my problem. Thanks.

But I wonder why this happend.
In my code I used example of code advised by you some time ago.

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!