EasyUI Forum
May 08, 2024, 08:43:27 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: Combobox with icons and iconAlign: 'left' Bug  (Read 6452 times)
Stefan B.
Full Member
***
Posts: 152


Software Architekt


View Profile Email
« on: August 19, 2014, 04:41:31 AM »

We would use an Icon in a combobox and for this we configure one combobox like this:

Code:
$('#cb').combobox({  
...
   iconAlign: 'left',
   iconWidth: 16,
    icons:[{
        iconCls:'icon-database-refresh',
        handler: function(e){
        reloadMenuCombo();
}
      }]
});

And when we do this the Combobox arrow is also on the left side.
This looks like a bug in Combobox use textbox attributes!

Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: August 19, 2014, 07:36:13 AM »

The 'arrow' icon is always on the right of icons. If you want to move it to the left, you have to do this by yourself.
Code:
var c = $('#cc');
var icon = c.combobox('getIcon', 1);
icon.prependTo(icon.parent());

Or you can define your own 'arrow' icon instead.
Code:
$('#cc').combobox({
  hasDownArrow: false,
  icons:[{
    iconCls:'combo-arrow',
    handler:function(){
      //...
    }
  },{
    iconCls:'icon-database-refresh'
  }]
})
Logged
Stefan B.
Full Member
***
Posts: 152


Software Architekt


View Profile Email
« Reply #2 on: August 19, 2014, 11:08:20 PM »

You should write this to the dokumentation of the combobox that also the combobox arrow icon goes to the left!
I think it should not do this.

The code you send me shows the combobox like the attachment image.

But I would have the arrow on the right and the icon on the left side of the combobox
« Last Edit: August 20, 2014, 02:37:27 AM by Stefan B. » 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!