EasyUI Forum
May 05, 2024, 06:31:07 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: combo 'auto' width doesnt work as expected  (Read 6797 times)
A-K
Full Member
***
Posts: 122


View Profile WWW
« on: November 01, 2014, 04:13:05 AM »

Hey, I have a problem with the width of the combo.

When I set it to 'auto' I expect to be the size of his parent div because thats the only
way to make the combo size be dynamic.

When using bootstrap with the grid system I need the combo to always be the size of his parent
so when the window size is changed bootstrap handles with making everything responsive but
the combo isnt dynamic and is stuck with width: 150px.

this is the html code:
Code:
<div class="row">
            <div class="col-md-4">
                <input id="ct">
            </div>
        </div>

This is the js:
Code:
$('#ct').combotree({
        url: 'tree_data1.json',
        method: 'get',
        width: 'auto'
    });

although the width is set to 'auto' its still given a fixed width that is 150px while his parent div is 316px. Is the width:'auto' supposed to act like this?
if instead of combo I inserted a datagrid it worked great! The width was responsive to the parent width but in combo it just doesnt work...

Thanks.
« Last Edit: November 01, 2014, 04:37:41 AM by A-K » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 01, 2014, 06:06:15 AM »

Please try this:
Code:
$('#ct').combotree({
        url: 'tree_data1.json',
        method: 'get',
        width: '100%'
    });
Logged
A-K
Full Member
***
Posts: 122


View Profile WWW
« Reply #2 on: November 01, 2014, 06:55:12 AM »

Works great! Thanks.
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!