Files
firecms/website/docs/api/interfaces/mapfieldconfig.md
2021-06-06 13:36:47 +02:00

2.8 KiB

id, title, sidebar_label, sidebar_position, custom_edit_url
id title sidebar_label sidebar_position custom_edit_url
mapfieldconfig Interface: MapFieldConfig<T> MapFieldConfig 0 null

Possible configuration fields for a string property. Note that setting one config disables the others.

Type parameters

Name
T

Hierarchy

Properties

clearMissingValues

Optional clearMissingValues: boolean

Set this flag to true if you would like to remove values that are not present in the saved value but are mapped in the schema. This is useful if you are creating a custom field and need to have only some specific properties. If set to false, when saving a new map value, fields that exist in Firestore but not in the new value are not deleted. Defaults to false.

Defined in

models/models.ts:971


customProps

Optional customProps: any

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

Inherited from

FieldConfig.customProps

Defined in

models/models.ts:821


field

Optional field: ComponentType<FieldProps<T, any, EntitySchema<any, 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

FieldConfig.field

Defined in

models/models.ts:808


pickOnlySomeKeys

Optional pickOnlySomeKeys: boolean

Allow the user to add only some of the 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 subproperties that may not be needed

Defined in

models/models.ts:961


preview

Optional preview: ComponentType<PreviewComponentProps<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

FieldConfig.preview

Defined in

models/models.ts:815