PDA

View Full Version : [FIXED-EXTJSIV-330] lastComponentSize undefined problem when adding grids to tabpanel



RodneyEdie
25 Mar 2011, 2:19 AM
Not sure if this is a bug or just because I don't know what I'm doing, but I get a problem on line 37294 of ext-all-debug.js. this.componentLayout.lastComponentSize is undefined. It is happening with some grids I am dynamically creating and adding to a panel. if the grid is on the first panel, it works fine, but for the panels that are not showing yet, I get this bug, and layout of any further components stops.

I have modified my copy of ext-all-debug.js to check for the condition, and now my app works as expected

i modified this:


getDesiredWidth: function() {
if (this.rendered) {
return this.componentLayout.lastComponentSize.width;

} else if (this.flex) {

return this.width;
} else {
return this.width;
}
},

to this:

getDesiredWidth: function() {
if (this.rendered) {
if( this.componentLayout.lastComponentSize === undefined ){
return this.width;
}
return this.componentLayout.lastComponentSize.width;



} else if (this.flex) {

return this.width;
} else {
return this.width;
}
},

Jamie Avins
25 Mar 2011, 7:02 AM
Thank you for the report, this has been fixed for the next release.