0
votes

I am using EXTJS 6.2 I have a gridpanel with many columns. I have different renderers - they work fine. Only one renderer does not.

renderer = function(value) {
      return value || '';
};

Why does the gridcolumn stay empty, if value == '0'

If I add the following to my renderer

 renderer = function(value) {
       if (value == 0) {
            return value;
       }
       return value || '';
 }

'0' will be displayed. I don't understand why I have to add these rows Can anybody explain that?

Thanks in advance

1

1 Answers

0
votes

This is due to your use of the logical operator || When it comes to yes 0 || return empty string because 0 is like false

fiddle