Reputation: 63054
Is it possible for a Flex List
to adjust its height automatically for the number of rows it's displaying? The problem I'm having is that the List renders taller than the number rows. The number of rows is dynamic so I'd like the List to automatically adjust its height based on its content. I've tried setting height="100%"
which doesn't help.
Upvotes: 0
Views: 3323
Reputation: 63054
It appears that List
defaults to fixed row height. Setting variableRowHeight
to true fixed it.
variableRowHeight="true"
Upvotes: 1
Reputation: 6059
If your items all render at the same height, you could bind the height of your list to the number of rows * the item renderer height.
Alternatively, if you are using Flex 4, you can create new skin for your List based on the existing List skin, but remove the Scroller that wraps the DataGroup and make the height of the DataGroup 100%.
Hope that helps.
Upvotes: 0