[
https://issues.apache.org/jira/browse/FLEX-24628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14538013#comment-14538013
]
Gareth Daniel Smith commented on FLEX-24628:
--------------------------------------------
Any change of reconsidering this? I agree with the original bug reporter:
REFRESH events on the wrapped list should cause a refresh on the wrapping list
too, otherwise the wrapping list gets out-of-sync.
> ListCollectionView does not react to wrapped list's REFRESH event
> -----------------------------------------------------------------
>
> Key: FLEX-24628
> URL: https://issues.apache.org/jira/browse/FLEX-24628
> Project: Apache Flex
> Issue Type: Bug
> Components: Collections
> Affects Versions: Adobe Flex SDK 3.5 (Release)
> Environment: Affected OS(s): Windows
> Affected OS(s): Windows XP
> Browser: Firefox 3.x
> Language Found: English
> Reporter: Adobe JIRA
> Assignee: Adobe JIRA
>
> Steps to reproduce:
> 1. Run code below
>
> Actual Results:
> list2 and list3 reports a length of 1 after the filter input has changed
>
> Expected Results:
> list3 and list3 should report a length of 0
>
> Workaround (if any):
> Don't know, maybe subclass ListCollectionView..? Wouldn't be the first class
> I have to subclass to fix a bug myself.
>
> -------------
> var numberToMatch:Number = 1;
>
> var list1:ArrayCollection = new
> ArrayCollection([1,2,3]);
>
> list1.addEventListener(CollectionEvent.COLLECTION_CHANGE,
> function(event:Event):void { trace(event); });
> var list2:ListCollectionView = new
> ListCollectionView(list1);
> list2.filterFunction =
> function(item:Object):Boolean { return Number(item) == numberToMatch; };
> list2.refresh();
>
> var list3:ListCollectionView = new
> ListCollectionView(list2);
> list3.sort = new Sort();
> list3.refresh();
>
> trace(list1.length);
> trace(list2.length);
> trace(list3.length);
>
> numberToMatch = 4;
> list1.refresh();
>
> trace(list1.length);
> trace(list2.length);
> trace(list3.length);
> list1.source = list1.source;
>
> trace(list1.length);
> trace(list2.length);
> trace(list3.length);
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)