EasyUI Forum

General Category => Bug Report => Topic started by: Stefan B. on August 19, 2014, 04:41:31 AM



Title: Combobox with icons and iconAlign: 'left' Bug
Post by: Stefan B. 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!



Title: Re: Combobox with icons and iconAlign: 'left' Bug
Post by: jarry 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'
  }]
})


Title: Re: Combobox with icons and iconAlign: 'left' Bug
Post by: Stefan B. 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