Looks like we cannot reproduce this. Please provide another test case to reproduce this issue.
-
Sencha User
2.1.0 RC1 - using "layout: 'fit'" causes errors.
Specifying items with a simple "layout: 'fit'" configuration throws "Uncaught TypeError: Object fit has no method 'onItemAdd'
" with the following stacktraceScreen shot 2012-10-13 at 1.53.06 PM.png
-
Sencha User
Example of failing view
Code:
items: [
{
xtype: 'tabpanel',
flex: 2,
cls: 'stretch',
layout: { animation: false },
tabBar: {
layout: {
type: 'hbox',
pack: 'stretch',
align: 'stretch'
},
ui: 'purple'
},
items: [
{
itemId: 'openProjectsContainer',
title: 'Open',
layout: 'fit',
items: [
{
xtype: 'extendedlist',
plugins: [{
xclass: 'Ext.plugin.PullRefresh'
}],
store: null, // set in controller
itemTpl: '{name}',
loadingText: 'Loading Projects',
grouped: true
}
]
},
{
itemId: 'archivedProjectsContainer',
title: 'Archived',
layout: 'fit',
items: [
{
xtype: 'extendedlist',
plugins: [{
xclass: 'Ext.plugin.PullRefresh'
}],
store: null, // set in controller
itemTpl: '{name}',
loadingText: 'Loading Projects',
grouped: true
}
]
}
]
}
]
-
This test is working for me in RC1 and RC2:
Code:
Ext.Viewport.add({
layout : 'fit',
items : {
xtype : 'tabpanel',
items : [
{
title : 'Open',
layout : 'fit',
items : [
{
html : 'Hello'
}
]
}
]
}
});
-
Sencha User
You're right Mitchell. Turns out I had a 'layout: fit' outside of a config block in a view class - which was causing the error. There was no warning of deprecation just that error.
Hopefully this helps someone else.
-
Sencha User
This helped me. Thank you.