Hi,
A viewport item, set scrollable: 'vertical', cause content disappear. Works on card layout.
Printable View
Hi,
A viewport item, set scrollable: 'vertical', cause content disappear. Works on card layout.
Test case and what ST 2.x.x version?
2.1.0
Ext.define("App.view.Viewport", { extend: "Ext.Panel",
config: {
layout: {
type: "hbox",
align: "stratch"
},
items: [{ width: 300, items[{xtype: "Ext.List"}] },
{ scrollable: "vertical", items: [{xtype: "Ext.ToolBar"},{html: "!!!!!!!!!!!!!! !!!!!!!!!!!!"}], flex: 1}]
}});
!!!!!!!!!!!!!!!!! should have been visible
You code is not very well formatted, not in CODE tags and not valid. The reason it's not valid is Ext.List and Ext.ToolBar are not valid xtypes and you will likely see errors in the console. Fixing your code in all 3 ways it works for me in ST 2.1.0:
Code:Ext.define('App.view.Viewport', {
extend : 'Ext.Panel',
xtype : 'app-viewport',
config : {
layout : {
type : 'hbox',
align : 'stratch'
},
items : [
{
width : 300,
items : [
{
xtype : 'list'
}
]
},
{
scrollable : 'vertical',
flex : 1,
items : [
{
xtype : 'toolbar'
},
{
html : '!!!!!!!!!!!!!! !!!!!!!!!!!!'
}
]
}
]
}
});
A second container in an mvc app is parent to anoth container which size is determined on the fly. Hence, the second container should be set as layout: {type: "hbox", align: "stretch"}
The align stretch default may have been missing in 2.1.0, since this has worked with 2.0.1-:)