PDA

View Full Version : [CLOSED] tdAttrs and trAttrs not working on Ext.layout.container.Table



oniseijin
29 Nov 2011, 6:26 PM
EXT JS 4.0.7 + Firefox

Take the following:


{ xtype:'container',
layout: {
type:'table',
columns: 1,
// won't center properly
tdAttrs: {
style: {
align: 'center'
}
},
tableAttrs: {
style: {
align: 'center'
}
}
},

items : [
{
xtype: 'label',
id:'group_name_label',
text:"Group Name",
cls: 'header'

},
{
xtype: 'label',
id:'user_name_label',
text:"User Name",
cls: 'sub-header'

}
]


},

tdAttrs does not get propagated to the underlying table (see below)

Using, trAttrs, the following error comes up: trEl.set is not a function

However, the tableAttrs does work properly.



<table class="x-table-layout" cellspacing="0" style="align:center;" role="presentation"><tbody>
<tr>
<td id="" class="x-table-layout-cell " colspan="1" rowspan="1">
<label id="group_name_label" class="x-component header x-component-default" for="" role="presentation">Super Group</label>


</td>


</tr>

<tr>
<td id="" class="x-table-layout-cell " colspan="1" rowspan="1">
<label id="user_name_label" class="x-component sub-header x-component-default" for="" role="presentation">Test User2</label>


</td>


</tr>


</tbody>


</table>

mitchellsimoens
30 Nov 2011, 12:05 PM
Checking with our latest code it looks like the <td> does get the align: center style.

oniseijin
30 Nov 2011, 4:50 PM
Thanks for checking!

So, this is a confirmed bug, but working in the latest branch of code?

Also, please note, the bug also extended to trAttrs as well, but it would not render giving the above mentioned error, so it would be good to check if that is fixed too in the latest code.