You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Mihai Chira (JIRA)" <ji...@apache.org> on 2015/05/13 16:29:00 UTC
[jira] [Commented] (FLEX-34837) DataGrid sorted with complex
dataField doesn't keep track of changes to those fields, leading to RTE
when trying to remove selected item
[ https://issues.apache.org/jira/browse/FLEX-34837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14542002#comment-14542002 ]
Mihai Chira commented on FLEX-34837:
------------------------------------
Actually, if the default GridItemEditor is used, the RTE will be thrown even for simple dataField values because in GridItemEditor.save() the sort is removed from the dataProvider, the change is made, and after that the sort is reapplied, but without calling refresh() on the collection. This effectively means that we're fooling the dataProvider into thinking that its items are correctly sorted according to the sort properties (by this I mean that if we call getItemIndex, it will use its sort info to find it, thinking everything is in order), when in fact the order is now practically random. Yes, this can be a problem when trying to remove the selected item, but it's much wider than that: keep in mind that usually a dataProvider is accessed by the developers long after it's assigned to a DataGrid, and they expect (especially if it wasn't sorted to begin with) that getItemIndex() will work correctly for their custom code. But due to this bug it doesn't.
> DataGrid sorted with complex dataField doesn't keep track of changes to those fields, leading to RTE when trying to remove selected item
> ----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FLEX-34837
> URL: https://issues.apache.org/jira/browse/FLEX-34837
> Project: Apache Flex
> Issue Type: Bug
> Components: Spark: DataGrid
> Affects Versions: Apache Flex 4.14.0
> Reporter: Mihai Chira
> Assignee: Mihai Chira
> Fix For: Apache Flex 4.15.0
>
>
> *Steps to reproduce*: run attached application
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)