[
https://issues.apache.org/jira/browse/FLEX-34101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13912608#comment-13912608
]
Justin Mclean commented on FLEX-34101:
--------------------------------------
OK manage to reproduce with a reasonably simple example:
{code}
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.FlexEvent;
import spark.collections.Sort;
import spark.collections.SortField;
[Bindable] protected var data:ArrayCollection = new
ArrayCollection([new Item("2"),new Item("1"),new Item("4"),new Item("3"),]);
protected function even(item:*):Boolean {
return (Number(item.label) % 2) == 0;
}
protected function changed(event:CollectionEvent):void {
trace("Kind: " + event.kind);
}
protected function filter(event:Event):void
{
data.sort = new Sort();
data.sort.fields = [new SortField("label")];
data.refresh();
data.addEventListener(CollectionEvent.COLLECTION_CHANGE, changed);
data.filterFunction = even;
data.refresh();
data[0].label = "1";
data.itemUpdated(data[0]);
}
]]>
</fx:Script>
<s:layout>
<s:HorizontalLayout />
</s:layout>
<s:DataGroup dataProvider="{data}"
itemRenderer="spark.skins.spark.DefaultItemRenderer">
<s:layout>
<s:VerticalLayout/>
</s:layout>
</s:DataGroup>
<s:Button label="filter" click="filter(event)" />
</s:Application>
{code}
Item.as
{code}
package
{
[Bindeable]
public class Item
{
public var label:String;
public function Item(label:String)
{
this.label = label;
}
public function toString():String {
return label;
}
}
}
{code}
> Regression from 4.8 to 4.10: Spark list doesn't refresh with filterFunction
> ---------------------------------------------------------------------------
>
> Key: FLEX-34101
> URL: https://issues.apache.org/jira/browse/FLEX-34101
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: List
> Affects Versions: Apache Flex 4.10.0
> Reporter: Tristan
> Priority: Critical
> Fix For: Apache Flex 4.12.0
>
> Attachments: Test.fxp
>
>
> I will post a project to test the case.
> To reproduce
> - open and launch the projet
> - click on one line
> - on the new View, clic on the only button
> Apache Flex 4.8:
> - the view is popped and the item clicked disappears
> Apache Flex 4.10
> - the view is popped and the item clicked doesn't disappears
> - Just scroll a little bit on the spark list and the item disappears
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)