1 Reply Latest reply on Feb 15, 2008 7:19 AM by mlmadque

    Selection breaks after inserting into dataProvider

    mlmadque Level 1
      I have been battling this issue for a couple of days now. I have a HorizontalList that is using an itemRenderer component that I created. When I insert an item into the dataProvider using addItemAt....

      1) the item is inserted
      2) i see the item rendered correctly in the HorizontalList

      However, the selection breaks. What I mean by this is the newly added items does NOT highlight when I roll over it and if I click on it, it does not select. This only happens for the newly added item, all the others that were already in the list work fine (highlight and can be selected).

      I've tried calling validateNow() on the HorizontalList after inserting into the dataprovider but it doesn't help at all.

      Please help.
        • 1. Re: Selection breaks after inserting into dataProvider
          mlmadque Level 1
          I can't believe this, but after 2 days of trying to figure this out I figured it out just moments after posting to the forum!

          Here is what fixed it and I am not sure exactly why. At this point I don't care...

          The dataProvider I was using contained a list of custom objects. I had a property on the class called uid. When I commented out this property, everything worked. I don't know what made me think to try this. I guess my uid property on the class was conflicting with the uid property on the itemRenderer component or something.

          Finally.