I am trying to use two different item renderers via view states (detail, or open). The itemRenders display different data and different sizes. When a list item in the Opened state is clicked, the state is changed to detail and a new itemRenderer is used. However, the updated list clips content past 25 items. I have tried invalidateDisplayList() but doesn't seem to work. Thanks for any the help.
<s:List id="list"
currentStateChange="{list.invalidateDisplayList(); list.measuredHeight = 20000}"
dataProvider="{items}"
width.Opened="310"
width.detail="610"
skinClass="skins.ListSkin"
itemRenderer="components.renderers.ListItemRenderer"
itemRenderer.detail="components.renderers.ListItemRendererDetail">
</s:List>
I think it might actually have to to with the requestedRowCount property of the Layout class. I noticed that even if I set it to show all rows (-1), on a state change it defaults back to not showing all rows.
<s:layout>
<s:VerticalLayout gap="0"
horizontalAlign="contentJustify"
requestedRowCount="-1"/>
</s:layout>
And one more thing, After some testing, 9998 px seems to be the limit for a List's height before it can no longer show all requested rows and scrollbars appear. Is there a workaround?