Repeater
Repeater
The Repeater
component renders a repeater with given child components.
- Component
- Component - advanced
- API schema
<Repeater field="tasks" label="Todo list" orderBy="content">
<TextAreaField field="content" label="Task" />
</Repeater>
<Repeater field="tasks" label="Todo list" sortableBy="order">
<CheckboxField field="done" label="Done" defaultValue="false" />
<TextAreaField field="content" label="Task" />
</Reapeater>
export class TodoList {
tasks = def.oneHasMany(Task, "todoList");
}
export class Task {
order = def.intColumn();
done = def.boolColumn();
content = def.stringColumn();
todoList = def.manyHasOne(TodoItem, "tasks");
}
Props
Prop | Description |
---|---|
| string The name of the column in Contember schema where to store data. Required |
| ReactNode The label for the field. Required |
| undefined | string The name of the column in Contember schema that is used to sort the options. |
| undefined | string The name of the column in Contember schema that is used to order the options. |