Skip to main content

Field views

Field View​

The FieldView component renders a field value.

<FieldView
field="startAt"
label="Event start"
render={(filedAccessor) => <>{fieldAccessor.value}</>}
/>

Props​

PropDescription

field

string

The name of the column in Contember schema where to store data.

Required

render

(FieldAccessor) => ReactNode

A function that is called to render the field.

Required

key

undefined | Key | null

The key of the field. If the key is not specified, the key is generated from the field name.

fallbackIfUnpersisted

ReactNode

A fallback component that is rendered when the component is not persisted.