EditFormTemplate

Props interface for custom row-level edit form templates in the grid. Provides row data, column configurations, validation state, and action callbacks for implementing full editing forms. Enables dynamic field updates, error display, and control over save/cancel operations during add or edit modes.

Props

The following table outlines the props for the EditFormTemplate:

NameTypeDefaultDescription
columns
[ ]

Array of column configurations for the grid. Used to render fields matching editable columns, including types and validation rules.

data
T
{}

Complete data object for the row being edited or added. Contains current field values updates via onFieldChange reflect here for form state management.

disabled
boolean
false

Boolean to disable form controls during processing. Set true during save operations to prevent concurrent edits.

formState
FormState
{}

Current state of the form, including validity and dirty flags. Used for conditional rendering or disabling controls.

isAddOperation
boolean
false

Boolean indicating if the operation is for adding a new row. True for add mode, false for edit mode—enables conditional logic.

onFieldChange
(field: string, value: ValueType | null) => void
-

Callback to update a specific field value in the row data. Triggers validation and form re-render on change.

setInternalData
React.Dispatch<React.SetStateAction<T>>
{}

State setter for internal form data updates. Allows manual synchronization of data beyond onFieldChange.

validationErrors
Object | Object
{}

Object mapping field keys to validation error messages. Displays per-field errors when present empty for valid states.