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: { name: "Name", description: "Text that will be shown on the button", validation: { required: true }, dataType: "string" }, type: { name: "Type", description: "Action type that determines the user flow", validation: { required: true, uniqueInArray: true }, dataType: "string", enumValues: { complete: "Complete", continue: "Continue" } } }});properties
Section titled “properties”Record of properties included in this map.
previewProperties
Section titled “previewProperties”List of properties rendered as this map preview. Defaults to first 3.
spreadChildren
Section titled “spreadChildren”Display the child properties as independent columns in the collection
view. Defaults to false.
expanded
Section titled “expanded”Should the map be expanded by default in the form view. Defaults to false.
keyValue
Section titled “keyValue”Render this map as a key-value table that allows to use arbitrary keys. You don’t need to define the properties in this case.
expanded
Section titled “expanded”Determines whether the field should be initially expanded. Defaults to true.
minimalistView
Section titled “minimalistView”When set to true, displays the child properties directly without being wrapped in an extendable panel.
validation
Section titled “validation”requiredShould this field be compulsory.requiredMessageMessage to be displayed as a validation error.
The widget that gets created is
MapFieldBindingField that renders the children property fields
Links: