Basic components
#
FieldThe Field
components renders value of the field.
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| Scalar The default value of the field. |
| undefined | (value: Scalar ) => ReactNode A function that formats the value as a ReactNode. The function is called with the value as the first argument. |
| undefined | boolean If true, the field is non-bearing. |
| undefined | Key | null The key of the field. If the key is not specified, the key is generated from the field name. |
| undefined | (value: Scala}) => Scalar A function that is called before the value is updated. |
| undefined | (value: Scalar) => Scalar A function that is called when the field is initialized. |
| undefined | (value: Scalar) => Scalar A function that is called when the value is updated. |
#
Text fieldThe TextField
component renders a text field. The text field is used for basic string editing and has no rich text editing capabilities.
- Component - simple
- Component - advanced
- API schema
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| ReactNode The label for the field. Required |
| undefined | string A description of the field. The description is displayed in the tooltip. |
| undefined | string The access key of the field used to setup keyboard shortcut for the field. More info: MDN Access Key |
| boolean Whether the field should be focused on mount. The last field with autoFocus property set to true will be focused, If there are multiple ones. |
| undefined | boolean If true, the field allows newlines. |
| ReactNode The description for the field. |
#
Text area fieldThe TextAreaField
component renders a text area field. The text field is used for basic string editing and has no rich text editing capabilities.
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| ReactNode The label for the field. Required |
#
Rich text fieldThe RichTextField
component renders a rich text field. The text field is used for rich text editing.
- Component - simple
- Component - advanced
- API schema
Component displays only italic, underline and strike through buttons in format text option.
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| ReactNode The label for the field. Required |
| undefined | ToolbarButtonSpec[] | ToolbarButtonSpec[][] Buttons to be displayed in the inline toolbar. |
#
Date fieldThe DateField
component renders date input for editing date.
- Component
- API schema
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| ReactNode The label for the field. Required |
#
Date & Time fieldThe DateTimeField
component renders a date&time field for editing date and time.
- Component
- API schema
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| ReactNode The label for the field. Required |
#
Field ViewThe FieldView
component renders a field value.
#
PropsProp | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| (FieldAccessor) => ReactNode A function that is called to render the field. Required |
| undefined | Key | null The key of the field. If the key is not specified, the key is generated from the field name. |
| ReactNode A fallback component that is rendered when the component is not persisted. |