NumberCell template

Displays number, this cell allows to customize format number values using Intl.NumberFormat.

Implementation

  • Open NumberCell implementation on github

Interface declaration

interface NumberCell extends Cell {
    type: 'number';
    value: number;
    format?: Intl.NumberFormat;
    nanToZero?: boolean;
    hideZero?: boolean;
}
Property nameTypeProperty description
typeheaderType of cell template
valuenumberValue of cell
format?Intl.NumberFormatFormats value, if undefined formats number according to currect browser locale
nanToZero?booleanIf value equals NaN then displays 0
hideZero?booleanIf displayed value equals 0 then value is not rendered