<Table.RecordModal />
Table.RecordModal
is a component for displaying an insert or update form for a database table. It works directly with the createTableRpc settings and must always be used within a Table component.
Fields
The fields
prop lets you customize the form fields displayed in the insert and update forms.
By default, you don't need to manually define form fields — they are automatically created based on your database schema and createTableRpc
settings.
However, we recommend explicitly defining the fields prop to avoid unnecessary fields and make future maintenance easier.
Each field is an object with the following properties:
column: The name of the column in the table.
label (optional): The label displayed to users for this field. Defaults to the column name if not provided.
formField: Specifies the type of form field to use for this column
required (optional): If true, this field must be filled out in form.
Basic field types
The type property defines the field type and supports additional properties depending on the type.
Below is a list of supported formFields types and their interfaces:
input
A single-line text input. javascript Copy code
numberInput
A number-only input field.
textarea
A multi-line text input.
select
A searchable dropdown menu.
checkbox
A checkbox for boolean input.
datePicker
An inline date (datetime) picker.
timePicker
An inline time picker.
recordSelect
Select records from another table.
Requires a one-to-one relationship to be configured (see one-to-one linked).
Custom field
Use a custom React component for input.
Last updated