Skip to main content
Version: 1.0.4

ColumnSchema

@spartanfx/react v1.0.4


@spartanfx/react / ColumnSchema

Interface: ColumnSchema

Describes a single column in the data grid schema.

Remarks

Defines field behavior, display properties, validation, formatting, and optional rendering.

Properties

PropertyTypeDescription
applyStyle?(value, row) => CSSPropertiesFunction to compute custom style per cell based on its value and row.
decimals?numberNumber of decimal places (only for float type).
defaultValue?anyDefault value to apply for new rows or blank inputs.
fieldNamestringUnique identifier for the field (must match keys in data rows).
locked?booleanLocks the entire column from edits.
multiline?booleanIf true, allows multiline text input.
namestringHuman-readable column label.
onRenderControl?(props) => ReactElementOptional custom renderer for the input control.
onRenderValue?(value) => unknownOptional formatter function for display-only rendering.
options?IDropdownOption<any>[]Options for dropdown fields (type: 'option').
readOnly?booleanMarks the column as read-only.
required?booleanMarks the field as required for validation.
type"boolean" | "option" | "text" | "float" | "date" | "integer"Data type for the column (determines rendering and validation).
validate?(value, row) => stringOptional validation function, returning an error message or undefined.
width?string | numberOptional fixed width (e.g., "150px" or 150).