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

Mihai Chira updated FLEX-34853:
-------------------------------
    Description: 
{code}
            _sut.addAll(from4To0); //values["name"]: Object4, Object3, Object2, 
Object1, Object0

            const sortByIndexAscending:Sort = new Sort();
            sortByIndexAscending.fields = [new SortField("index", false, false, 
true)];
            _sut.sort = sortByIndexAscending;
            _sut.refresh(); //should be: Object0, Object1, Object2, Object3, 
Object4

            //when
            sortByIndexAscending.fields = [new SortField("name", false, true, 
false)]; //should have no effect

            //then
            assertThat(_sut.getItemIndex(from4To0.getItemAt(i)) != -1); //an 
RTE is thrown here
{code}

*Expected behaviour*: the collection should redo the sort when any of its 
sort's flags changes, or whenever one of the sortFields' flags changes.

  was:
{code}
            _sut.addAll(from4To0); //values["name"]: Object4, Object3, Object2, 
Object1, Object0

            const sortByIndexAscending:Sort = new Sort();
            sortByIndexAscending.fields = [new SortField("index", false, false, 
true)];
            _sut.sort = sortByIndexAscending;
            _sut.refresh(); //should be: Object0, Object1, Object2, Object3, 
Object4

            //when
            sortByIndexAscending.fields = [new SortField("name", false, true, 
false)]; //should have no effect

            //then
            assertIndexesAre([0, 1, 2, 3, 4]);
            assertThat(_sut.getItemIndex(from4To0.getItemAt(i)) != -1); //an 
RTE is thrown here
{code}

*Expected behaviour*: the collection should redo the sort when any of its 
sort's flags changes, or whenever one of the sortFields' flags changes.


> ListCollectionView.getItemIndex throws RTE when the Sort's sortFields change
> ----------------------------------------------------------------------------
>
>                 Key: FLEX-34853
>                 URL: https://issues.apache.org/jira/browse/FLEX-34853
>             Project: Apache Flex
>          Issue Type: New Feature
>          Components: Collections, Spark: Sort and SortField
>    Affects Versions: Apache Flex 4.14.1
>            Reporter: Mihai Chira
>            Assignee: Mihai Chira
>             Fix For: Apache Flex 4.15.0
>
>
> {code}
>             _sut.addAll(from4To0); //values["name"]: Object4, Object3, 
> Object2, Object1, Object0
>             const sortByIndexAscending:Sort = new Sort();
>             sortByIndexAscending.fields = [new SortField("index", false, 
> false, true)];
>             _sut.sort = sortByIndexAscending;
>             _sut.refresh(); //should be: Object0, Object1, Object2, Object3, 
> Object4
>             //when
>             sortByIndexAscending.fields = [new SortField("name", false, true, 
> false)]; //should have no effect
>             //then
>             assertThat(_sut.getItemIndex(from4To0.getItemAt(i)) != -1); //an 
> RTE is thrown here
> {code}
> *Expected behaviour*: the collection should redo the sort when any of its 
> sort's flags changes, or whenever one of the sortFields' flags changes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to