avoid showing "undefined" if there's no comment, renderer must not
return null or undefined directly, it will converted to string as is,
so always fallback to '' empty string
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
dataIndex: 'comment',
flex: 6,
renderer: function(value, metaData, record) {
- let comment = render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record);
- return `<span data-qtip="${comment}">${comment}</span>`;
-},
-
+ let comment = render_errors('comment', Ext.util.Format.htmlEncode(value), metaData, record) || '';
+ if (comment.length * 12 > metaData.column.cellWidth) {
+ comment = `<span data-qtip="${comment}">${comment}</span>`;
+ }
+ return comment;
+ },
},
);