NumberCell

The NumberCell template is used to display and manipulate numeric values within a cell.

Implementation

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 nameTypeDescription
valuenumberThe numeric value of the cell.
onValueChanged(newValue: number) => voidCallback function that is called when the user commits text changes.
validator?(value: number) => booleanFunction to validate the value.
errorMessage?stringError message to display when validation fails.
hideZero?booleanFlag to hide the zero value.
allowSeparators?booleanFlag to allow or disallow the use of separators in the cell.
format?Intl.NumberFormatNumber format to apply to the value.
style?React.CSSPropertiesCSS properties to apply to the cell.