flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maurice Amsellem (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-33813) Datagrid goes blank when assigning new dataProvider.source and calling refresh
Date Fri, 11 Oct 2013 13:16:42 GMT

    [ https://issues.apache.org/jira/browse/FLEX-33813?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13792592#comment-13792592
] 

Maurice Amsellem commented on FLEX-33813:
-----------------------------------------

spotted the issue:

{code}
Grid.as 
line 850:
const gridViewLayout:GridViewLayout = centerGridView.gridViewLayout;
 const gridMaxVSP:Number = contentHeight - height;
const centerContentHeight:Number = Math.ceil(gridViewLayout.gridDimensionsView.getContentHeight());
 const centerMaxVSP:Number = centerContentHeight - centerGridView.height;
const vsp:Number = (centerMaxVSP / gridMaxVSP) * value;
 centerGridView.verticalScrollPosition = vsp;
{code}

Called by : Grid.verticalScrollPosition = 0;

Problem: contentHeight is NaN, and centerContentHeight is NaN, so all computations return
NaN, and no renderers are displayed.

> Datagrid goes blank when assigning new dataProvider.source and calling refresh
> ------------------------------------------------------------------------------
>
>                 Key: FLEX-33813
>                 URL: https://issues.apache.org/jira/browse/FLEX-33813
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: DataGrid
>    Affects Versions: Apache Flex 4.10.0
>         Environment: OS X, Apache Flex 4.10.0
>            Reporter: Gareth Daniel Smith
>            Assignee: Maurice Amsellem
>              Labels: datagrid, spark
>         Attachments: DataGridRender.zip
>
>
> Given a spark DataGrid with an ArrayCollection dataProvider, the DataGrid can erroneously
go blank in the following situation:
> - the DataGrid has been scrolled down so it is not at the very top.
> - the .source property is changed on the dataProvider to be a new Array where the new
values in the Array are also different objects to the objects in the previous .source Array.
> - .refresh() is called on the DataGrid
> This is possibly the same bug as FLEX-33066.
> I will attach a minimal test case.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message