happyyangyuan
happyyangyuan

Reputation: 179

extjs 5 grid's scrollbar does not work in border layout panel

in border layout panel , the grid's scroll-bar doesn't work correctly even though the store of grid is long enough to make the grid overflow!

if my grid is in none border layout panel , the scroll-bar is OK, but when i put the grid in the border layout panel , either there is no scroll-bar ,either there is a invalid scroll-bar!

{
        // what i want is  to make this grid to scroll ! the scroll-bar is nested in a border layout panel.
        xtype: 'grid',
        title: 'west bottom grid(I am begging for your scrollbar !)',
        columns: [{
            text: 'header',
            dataIndex: 'header'
        }],
        store: Ext.create('MyApp.OverflowStore'), //this store is long enough to make the grid overflow
        autoScroll: true
    }

full code : see sencha fiddle : https://fiddle.sencha.com/#fiddle/ffv

if anyone could help to give the grid a correct scrollbar ?

Upvotes: 2

Views: 5843

Answers (1)

Gabriel Kohen
Gabriel Kohen

Reputation: 4286

You should make sure you set up layouts for your components' containers as well as to make sure that containers like the grid have a flex value to have the space properly allocated. See corrected fiddle here

Upvotes: 6

Related Questions