View Full Version : [FIXED] DataView value bug

7 Nov 2012, 12:40 PM
Not so much a question as a bug report...

We have found that when using the dataitem object with numeric values, the dataview fails to display the value of integer 0. The issue was traced down the sencha doMapData function, which is supposed to be checking for null or undefined, but is also failing the boolean check because the value of zero will cause the if statement to evaluate to false. For example, we have a setterName of "KPIValue" with the value of 0 (integer). Instead of displaying 0 on the dataview, it leaves the field blank (investigation showed that the (html: 'value') field was completely missing in chrome console.)

dataitem.js :

doMapData: function(dataMap, data, item) {

if (data && component[setterName] && data[setterMap[setterName]]) {

-Blayne Watt
Lead Engineer
General Electric, Inc.

8 Nov 2012, 5:41 AM
Moved to the bugs forum and I have opened a bug in our bug tracker.

8 Nov 2012, 6:14 AM
As a note for anyone else encountering the issue, you can work around it by converting all your numeric values into strings, which will not evaluate to boolean false.

3 Dec 2012, 7:29 AM
Thanks for the report! This has been fixed for the next release.