You found a bug! We've classified it as
EXTJS-5619
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
Sencha User
[Ext 4.1 beta 3] Incorrect layout on Radiogroup with columns
I've noticed an error in 4.1 beta 3 relating to radio groups that was NOT present in 4.0.7. As far as I can tell this doesn't relate to any of the API changes stickied at the top of this forum.
According to the documentation, a radiogroup can accept a column parameter which can be either
a) A float
b) An integer
c) An array of floats/integers where floats represent proportional widths and integers fixed widths.
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.form.RadioGroup-cfg-columns
When going with option c) the layout gets completely stuffed up (almost as if the columns were treating the floats as fixed widths).
Here is a screenshot demonstrating the problems under 4.1.0 beta 3 with FF.
extjs-radiogroup.png
Here is an example pulled from the radiogroup documentation (and modified slightly)
Code:
Ext.create('Ext.form.Panel', {
title: 'RadioGroup Example',
width: 300,
height: 125,
bodyPadding: 10,
renderTo: Ext.getBody(),
items:[{
xtype: 'radiogroup',
fieldLabel: 'Two Columns',
// Arrange radio buttons into two columns, distributed vertically
columns: [0.5, 80],
vertical: true,
items: [
{ boxLabel: 'Item 1', name: 'rb', inputValue: '1' },
{ boxLabel: 'Item 2', name: 'rb', inputValue: '2', checked: true},
{ boxLabel: 'Item 3', name: 'rb', inputValue: '3' },
{ boxLabel: 'Item 4', name: 'rb', inputValue: '4' },
{ boxLabel: 'Item 5', name: 'rb', inputValue: '5' },
{ boxLabel: 'Item 6', name: 'rb', inputValue: '6' }
]
}]
});
-
Thanks for the report. This bug only appears when you have columns : [0.5, 80]. If you have [80, 0.5] then it works fine. I have opened a ticket.