PDA

View Full Version : Dynamic height for DataView/List component



barrybear
20 Nov 2013, 9:35 PM
Hello all,

I've been experimenting with different layouts and been to different posts on this matter but I still cannot find a solution to it.

My idea is whereby inside a panel (with scrollable:true), exits components Label, DataView, Label and another Dataview all placed below each other. Using Vbox layout for the panel and settings flex for each components would not be ideal as the DataView elements may differ based on the situation. I've set DataView's scrollable to false to but it is still not achievable..

fmoseley
22 Nov 2013, 1:53 PM
Lists do not auto size to the size of their data. They must be fullscreen, given a height, or in a vbox layout with flex. You could try calculating the height of the lists and setting it within their respective initialize function (itemHeight * # items in your list). Or you could use a dataview but must set scrollable to null instead of false. You can style it with css.
https://fiddle.sencha.com/#fiddle/tu