NumberCell
The NumberCell
template is used to display and manipulate numeric values within a cell.
Implementation
- Open
NumberCell
implementation on GitHub (opens in a new tab)
Interface declaration
interface NumberCellProps {
value: number;
onValueChanged: (newValue: number) => void;
validator?: (value: number) => boolean;
errorMessage?: string;
hideZero?: boolean;
allowSeparators?: boolean;
format?: Intl.NumberFormat;
style?: React.CSSProperties;
}
Property name | Type | Description |
---|---|---|
value | number | The numeric value of the cell. |
onValueChanged | (newValue: number) => void | Callback function that is called when the user commits text changes. |
validator? | (value: number) => boolean | Function to validate the value. |
errorMessage? | string | Error message to display when validation fails. |
hideZero? | boolean | Flag to hide the zero value. |
allowSeparators? | boolean | Flag to allow or disallow the use of separators in the cell. |
format? | Intl.NumberFormat | Number format to apply to the value. |
style? | React.CSSProperties | CSS properties to apply to the cell. |