responsive design - Extjs 6 responsiveConfig cannot find setters for layout config items -
i've got a fiddle of base layout i'm trying add responsive configurations to.
my goal use border layout navigation can change between western region , northern region depending on window size , layout config can switch between vertical , horizontal when region west buttons grouped vertically , when region north buttons grouped horizontally.
i know default, layout type cannot changed @ runtime, found this forum thread user points out if use box
layout type (the parent of vbox , hbox) can update vertical
config change grouping @ runtime.
the fiddle linked above attempt @ prototyping concept out.
the problem i'm running responsiveconfig cannot find setters particular properties i'm trying change, , it's not vertical config. config items know have setters , have seen work before in responsiveconfig not working well:
ext.layout.container.box has setpack method.
am mis-configured somehow?
i posted thread in sencha's forums technique trying described. poster answered question answered post updated fiddle showing correct implementation.
i've added the responsive box implementation region switching fiddle.
here's responsive sections needed:
plugins: 'responsive', responsiveconfig:{ wide:{ layout:{ type: 'box', vertical: true, pack:'start' }, region: 'west' }, tall:{ layout:{ type: 'box', vertical: false, pack: 'center' }, region: 'north' }
i think important part know here (and tripping me up) have include type: 'box'
in layout
config responsiveconfig
property because responsiveconfig not firing each individual setter layout (type
, vertical
, , pack
), it's firing overall layout
setter method. if don't include type
config in object give layout config, uses default type 'auto'.
this why in screenshot included in original post error messages in javascript console referring ext.layout.container.auto
, not ext.layout.container.box
. error message right, ext.layout.container.auto doesn't have setpack
method.
Comments
Post a Comment