Skip to main content

DataRecordEditorProps

@gravity-rail/react


@gravity-rail/react / DataRecordEditorProps

Interface: DataRecordEditorProps

Properties​

className?​

optional className: string


dataType​

dataType: DataType

The DataType schema the record belongs to.


onCancel()?​

optional onCancel: () => void

Cancel handler; when provided a Cancel button is shown.

Returns​

void


onDeleted()?​

optional onDeleted: (recordId) => void

When provided, a Delete button is shown; called after a successful delete.

Parameters​

recordId​

number

Returns​

void


onError()?​

optional onError: (error) => void

Called on save/delete failure.

Parameters​

error​

Error

Returns​

void


onSuccess()?​

optional onSuccess: (record) => void

Called after a successful save with the updated record.

Parameters​

record​

DataRecord

Returns​

void


record​

record: DataRecord

The record to edit (its fieldValues seed the form).


submitLabel?​

optional submitLabel: string

Save button label.