Skip to main content
Version: 2.0.0-alpha

Interface: MapProperty<T>

Type parameters​

NameType
Textends Object = any

Hierarchy​

Properties​

Field​

• Optional Field: ComponentType<FieldProps<T, any, any>>

If you need to render a custom field, you can create a component that takes FieldProps as props. You receive the value, a function to update the value and additional utility props such as if there is an error. You can customize it by passing custom props that are received in the component.

Inherited from​

BaseProperty.Field

Defined in​

lib/src/models/properties.ts:126


Preview​

• Optional Preview: ComponentType<PropertyPreviewProps<T, any>>

Configure how a property is displayed as a preview, e.g. in the collection view. You can customize it by passing custom props that are received in the component.

Inherited from​

BaseProperty.Preview

Defined in​

lib/src/models/properties.ts:133


columnWidth​

• Optional columnWidth: number

Width in pixels of this column in the collection view. If not set the width is inferred based on the other configurations

Inherited from​

BaseProperty.columnWidth

Defined in​

lib/src/models/properties.ts:92


customProps​

• Optional customProps: any

Additional props that are passed to the components defined in field or in preview.

Inherited from​

BaseProperty.customProps

Defined in​

lib/src/models/properties.ts:139


dataType​

• dataType: "map"

Datatype of the property

Overrides​

BaseProperty.dataType

Defined in​

lib/src/models/properties.ts:444


defaultValue​

• Optional defaultValue: T

This value will be set by default for new entities.

Inherited from​

BaseProperty.defaultValue

Defined in​

lib/src/models/properties.ts:144


description​

• Optional description: string

Property description, always displayed under the field

Inherited from​

BaseProperty.description

Defined in​

lib/src/models/properties.ts:81


disabled​

• Optional disabled: boolean | PropertyDisabledConfig

Is this field disabled. When set to true, it gets rendered as a disabled field. You can also specify a configuration for defining the behaviour of disabled properties (including custom messages, clear value on disabled or hide the field completely)

Inherited from​

BaseProperty.disabled

Defined in​

lib/src/models/properties.ts:112


editable​

• Optional editable: boolean

Should this property be editable in the collection editor. If the property has been defined in code, it defaults to false otherwise, it defaults to true.

Inherited from​

BaseProperty.editable

Defined in​

lib/src/models/properties.ts:151


expanded​

• Optional expanded: boolean

Should the field be initially expanded. Defaults to true

Defined in​

lib/src/models/properties.ts:486


hideFromCollection​

• Optional hideFromCollection: boolean

Do not show this property in the collection view

Inherited from​

BaseProperty.hideFromCollection

Defined in​

lib/src/models/properties.ts:97


longDescription​

• Optional longDescription: string

Longer description of a field, displayed under a popover

Inherited from​

BaseProperty.longDescription

Defined in​

lib/src/models/properties.ts:86


name​

• Optional name: string

Property name (e.g. Product)

Inherited from​

BaseProperty.name

Defined in​

lib/src/models/properties.ts:76


pickOnlySomeKeys​

• Optional pickOnlySomeKeys: boolean

Allow the user to add only some keys in this map. By default, all properties of the map have the corresponding field in the form view. Setting this flag to true allows to pick only some. Useful for map that can have a lot of sub-properties that may not be needed

Defined in​

lib/src/models/properties.ts:475


previewProperties​

• Optional previewProperties: Partial<Extract<keyof T, string>>[]

Properties that are displayed when as a preview

Defined in​

lib/src/models/properties.ts:466


properties​

• Optional properties: PropertiesOrBuilders<Partial<T>>

Record of properties included in this map.

Defined in​

lib/src/models/properties.ts:449


propertiesOrder​

• Optional propertiesOrder: Extract<keyof T, string>[]

Order in which the properties are displayed. If you are specifying your collection as code, the order is the same as the one you define in properties, and you don't need to specify this prop.

Defined in​

lib/src/models/properties.ts:456


readOnly​

• Optional readOnly: boolean

Is this a read only property. When set to true, it gets rendered as a preview.

Inherited from​

BaseProperty.readOnly

Defined in​

lib/src/models/properties.ts:103


spreadChildren​

• Optional spreadChildren: boolean

Display the child properties as independent columns in the collection view

Defined in​

lib/src/models/properties.ts:481


validation​

• Optional validation: PropertyValidationSchema

Rules for validating this property

Overrides​

BaseProperty.validation

Defined in​

lib/src/models/properties.ts:461