EasyUI Forum
May 30, 2024, 11:51:45 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Set Drawer height to '100%' explicitly to make fit:true of inner Layout to work  (Read 1508 times)
JeroenvdV
Newbie
*
Posts: 21


View Profile Email
« on: May 26, 2022, 01:23:28 AM »

Hi,

For those using a Layout inside the Drawer, make sure to set the height property of the Drawer to 100% if you want the Layout to fit the Drawer's dimensions. Without doing that the Layout div's height becomes 1px even when you set its fit property to true.

Code:
<div id="drawer-additional-info" class="easyui-drawer" data-options="width:475,height:'100%'" >
    <div class="easyui-layout" data-options="fit:true">
        <div region="north" data-options="border:false,title:'Comments',collapsible:false" style="height:400px;">
             Some text...
        </div>
        <div region="center" data-options="border:false">
             Some text...
        </div>
    </div>
</div>
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: May 27, 2022, 08:23:08 AM »

If possible please call the 'resize' method after expanding it.
Code:
$('#drawer-additional-info').drawer({
onExpand: function(){
$(this).drawer('resize')
}
})
Logged
JeroenvdV
Newbie
*
Posts: 21


View Profile Email
« Reply #2 on: May 28, 2022, 12:24:03 PM »

Thanks Jarry, that works too! Smiley
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!