[ 
https://issues.apache.org/jira/browse/FLEX-26438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Mclean updated FLEX-26438:
---------------------------------

    Labels: easytest  (was: )
    
> ArrayCollection - setItemAt  API malfunctioning when it has filter function
> ---------------------------------------------------------------------------
>
>                 Key: FLEX-26438
>                 URL: https://issues.apache.org/jira/browse/FLEX-26438
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Collections
>    Affects Versions: Adobe Flex SDK 4.1 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>              Labels: easytest
>
> Steps to reproduce:
> 1.Create an ArrayCollection instance with any data
> public var dp:ArrayCollection = new ArrayCollection( 
> [{label:'santosh'},{label:'kumar'}]);
> 2.Create any filter function
>                       
> dp.filterFunction = function (itemA:Object):Boolean {
>       return true;
> } 
>       dp.refresh();                           
> 3. Swap elements in the following order 
> var item1:Object = dp.getItemAt(0);
> var item2:Object = dp.getItemAt(1);
> dp.setItemAt(item2,0);
> dp.setItemAt(item1,1);
>  
>  Actual Results:
>  
> Swapping failed 
> {label:'santosh'},
> {label:'kumar'}
>  
>  Expected Results:
> {label:'kumar'},
> {label:'santosh'} 
>  
> Workaround (if any):
> When ArrayCollection has filter function attached to it then Use setItemAt 
> API swap the elements starting from the highest order to the lowest. 
>  
> Do this:
> dp.setItemAt(item1,1);
> dp.setItemAt(item2,0);
> Don't do: 
> dp.setItemAt(item2,0);
> dp.setItemAt(item1,1);
> This issue can been reproduced even in previous version of Flex SDK's.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to