apache / apache/royale-asjs

ItemRenderer on Basic DataGrid doesn't work on 0.9.6

Open
#505 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
ActionScript
Stars
380
Forks
120
PR merge metrics
No merged PRs in 30d

Description

Hi,

There is an issue with itemRenderer on DataGrid.

The following code show empty cells (count cells is right but no text)

```






@namespace js "library://ns.apache.org/royale/basic";

.DataGridColumnList .StringItemRenderer {
border-style: solid;
border-color: #CCCCCC;
border-width: 1px;
background-color: white;
line-height: 40px;
padding: 2px;
}

.DataGridColumnList .DataItemRenderer {
border-style: solid;
border-color: #CCCCCC;
border-width: 1px;
background-color: white;
line-height: 40px;
padding: 2px;
}














```

![image](https://user-images.githubusercontent.com/6851433/66866476-a93ea300-ef99-11e9-979f-cf997f39574f.png)

When debugging js the issue is on setting data on itemRenderer :

(_DataItemRendererFactoryForArrayData.as_) function `dataProviderChangeHandler`
...
_ir.data = dp[i];_ // dp = ArrayList with right datas
jump to (_StringItemRenderer.as_)

```
org.apache.royale.html.supportClasses.StringItemRenderer.prototype.set__data = function(value) {
org.apache.royale.html.supportClasses.StringItemRenderer.superClass_.set__data.apply(this, [ value] );
this.text = this.dataToString(value);
};
```

**value** is undefined when enter function

Source code
[DataGridExample.zip](https://github.com/apache/royale-asjs/files/3731342/DataGridExample.zip)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the DataGridExample.zip reproduction and setting the ArrayList data provider. Read _DataItemRendererFactoryForArrayData.as, especially dataProviderChangeHandler, then follow the value passed into StringItemRenderer.as and its set__data function. Done means the DataGrid cells display the expected label and value text.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.