Removing list of elements from Array or ArrayCollection

If you need to remove list of selected items in List component in Flex
you should not go from first element to last element of selectedIndices array
because once you remove one selected element all indexes will shift on one position to the left

solution is very simple you just need to go from last element to first element of selectedIndices array

in this case you will not have any problems with indexes

same for simple Array

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.