2 Replies Latest reply on Nov 16, 2010 2:34 PM by ohemmi

    after sorting spark lists selectedItem is incorrect


      So i have a ArrayCollection that i sort.

      something like...

      var sort:Sort = new Sort;

      sort.fields = [new SortField("my_field")];

      myArrayCollection.sort = sort;



      This collection is the data provider in my spark list... and an event for change...

      <s:List id="message_list" 





      in my event i have ...

      protected function list_changeHandler(event:IndexChangeEvent):void






      the message_list.selectedItem is incorrect. It is a different item than the one in the list. If i comment out the sorting part it works just fine, message_list.selectedItem is correct, with the sort the item is incorrect.


      Is this a bug? Am i doing something wrong?