Merge pull request #2469 from PublicI/fix/null-number-format

Display nulls and empty values as blank in table numeric fields
This commit is contained in:
Arik Fraimovich
2018-04-24 22:53:57 +03:00
committed by GitHub

View File

@@ -47,7 +47,7 @@ function createBooleanFormatter(values) {
function createNumberFormatter(format) {
if (_.isString(format) && (format !== '')) {
const n = numeral(0); // cache `numeral` instance
return value => n.set(value).format(format);
return value => (value === null || value === '' ? '' : n.set(value).format(format));
}
return value => value;
}