Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
Apache Flex 4.14.1
-
None
Description
_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
Expected behaviour: the collection should resort when any of the flags of its Sort object changes, or whenever one of the flags of the Sort's SortField list changes. That, or Sort and SortField should be made immutable, to prevent this scenario in the first place.