A Sencha Touch newbie here. That said, I've been slowly getting my head around it in the last day or so. One thing that has driven me insane is formpanels and lists not showing up for some weird layout reason. I can't work out why. For instance I have the following Search view:
Ext.define('NC.view.Search', {
extend: 'Ext.dataview.List',
xtype: 'searchpage',
id: 'search-form',
config: {
title: 'Search',
layout: 'vbox',
itemTpl: '<div class="name">{name}</div>',
store: 'Recipes',
items: [
{
xtype: 'toolbar',
docked: 'top',
items: [
{ xtype: 'spacer' },
{
xtype: 'searchfield',
placeHolder: 'Search...'
},
{ xtype: 'spacer' }
]
}
]
}
})
This sits in a tab panel:
Ext.define('NC.view.Recipes', {
extend: 'Ext.tab.Panel',
xtype: 'recipetabpanel',
config: {
title: 'Recipes',
tabBarPosition: 'bottom',
activeItem: 0,
items: [
{
title: 'Recipes',
iconCls: 'bookmarks',
items: [
{
xtype: 'searchpage'
}
]
},
{
title: 'Settings',
iconCls: 'settings',
html: 'Settings screen'
}
]
}
})
What this results in is a lovely rendered tab panel, with a docked search bar up the top, but no list items visible. If I add to my list panel some dimensions:
width: '100%',
height: '200px',
the list items from my data store appear. But I can't put height to 100% because it'll disappear (CSS fault my guess).
So what layout hierarchy or specifications do I need to make the list appear and take up the area between the search bar and the tabs down the bottom? Thanks!