2 Replies Latest reply on Feb 22, 2010 11:34 PM by franto kormanak

    Size invalidation problem with nested s:Lists

    franto kormanak Level 1



      I've custom component which are using nested Spark Lists. Like


      <MainComponent> it has 3 <comp1> components which has <s:List> inside and in each itemRenderer of this list is another List. All works nice except size invalidation. When deepest List itemRenderer change it's state which means it's height is changed, all parent Lists size should be updated. But it's not. I've also notifiad parent List with invalidateSize or invalidateDisplayList and measure() and updateDisplayList() is called but with old sizes. Only when I mouseover that components in new state (but wit old size), components are correctly resized. Another solution is change currentState on the deepest List itemRenderer back, and top List are rendered but "one step back" state size


      So imagine this:

      deepest itemRenderer has 2 states:

      - closed: height = 0

      - opened: height = 100;


      - when I change state to "opened" itemRenderer has correct size:100px, but it's parent has size 0px. When I rollover that component, size is changed to 100px.


      or other solution:


      - I have change state to "opened" - parent size stay unchanged. I ave change state back to "close" and parent size is automatically 100px (1 step behind), when I change state to "opened" again, size is 0px (1 step behind)



      I hope this is clear, can someone has any hint? or is this bug of Flex 4 beta 2?


      thank you for your responses