Skip to main content

Repeaters

Block repeater​

The BlockRepeater component is a simple way to repeat blocks of content. Use Block for wrapping fields.

<BlockRepeater 
field="blocks"
label="Content"
discriminationField="type"
>
<Block discriminateBy="content" label="">
...
</Block>
</Reapeater>

Props​

PropDescription

field

string

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

Required

label

ReactNode

The label for the field.

Required

discriminationField

string | SugaredRelativeSingleField

Required

sortableBy

undefined | string

The name of the column in Contember schema that is used to sort the options.

enableRemoving

boolean

enableRemoving

undefined | RemovelType

addButtonText

undefined | string

Repeater​

The Repeater component renders a repeater with given child components.

<Repeater field="tasks" label="Todo list" orderBy="content">
<TextAreaField field="content" label="Task" />
</Reapeater>

Props​

PropDescription

field

string

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

Required

label

ReactNode

The label for the field.

Required

sortableBy

undefined | string

The name of the column in Contember schema that is used to sort the options.

orderBy

undefined | string

The name of the column in Contember schema that is used to order the options.