EditTemplateProps

Props interface for custom edit template components used in grid. This interface defines the structure of data and callbacks passed to a custom React component used for editing grid rows.

Props

The following table outlines the props for the EditTemplateProps:

NameTypeDefaultDescription
action
string | ActionType
-

Specifies the current editing context in which the template is being rendered. This property indicates whether the template is used for adding a new record or editing an existing one. It helps differentiate between create and update operations, allowing conditional rendering or logic based on the editing mode. Supported values:

  • Add: The template is used to create a new record.
  • Edit: The template is used to modify an existing record.
column
-

Configuration object for the current column being edited. Includes metadata such as field name, data type, validation rules, and display settings.

data
T
-

Complete data object for the row currently being edited. Useful for accessing other field values or performing conditional logic within the template.

defaultValue
ValueType | Object
-

The initial value for the field being edited. This value is typically used to populate the input control within the template.

Methods

The following table outlines the methods for the EditTemplateProps:

NameParametersReturnsDescription
onChange
  • value

    : ValueType | Object
  • void

    Callback function triggered when the field value changes.


    Params:
  • value: The updated value from the input control.