mirror of
https://github.com/zhigang1992/firecms.git
synced 2026-06-14 09:38:59 +08:00
1.3 KiB
1.3 KiB
id, title, sidebar_label
| id | title | sidebar_label |
|---|---|---|
| map | Map | Map |
In a map property you define child properties in the same way you define them at the entity schema level:
import { buildProperty } from "./builders";
const ctaProperty = buildProperty({
dataType: "map",
properties: {
name: {
title: "Name",
description: "Text that will be shown on the button",
validation: { required: true },
dataType: "string"
},
type: {
title: "Type",
description: "Action type that determines the user flow",
validation: { required: true, uniqueInArray: true },
dataType: "string",
config: {
enumValues: {
complete: "Complete",
continue: "Continue"
}
}
}
}
});
properties
Record of properties included in this map.
previewProperties
List of properties rendered as this map preview. Defaults to first 3.
validation
requiredShould this field be compulsory.requiredMessageMessage to be displayed as a validation error.
The widget that gets created is
MapFieldField that renders the children property fields
Links: