Skip to main content
Version: 2.0.0-alpha

Interface: PropertyFieldBindingProps<M>

In case you need to render a field bound to a Property inside your custom field you can use PropertyFieldBinding with these props.

Type parameters

NameType
Mextends Object = any

Properties

autoFocus

Optional autoFocus: boolean

Should the field take focus when rendered. When opening the popup view in table mode, it makes sense to put the focus on the only field rendered.

Defined in

lib/src/models/fields.tsx:192


context

context: FormContext<M>

The context where this field is being rendered. You get a context as a prop when creating a custom field.

Defined in

lib/src/models/fields.tsx:165


disabled

Optional disabled: boolean

Should this field be disabled

Defined in

lib/src/models/fields.tsx:197


includeDescription

Optional includeDescription: boolean

Should the description be included in this field

Defined in

lib/src/models/fields.tsx:170


partOfArray

Optional partOfArray: boolean

Is this field part of an array

Defined in

lib/src/models/fields.tsx:186


property

property: StringProperty | NumberProperty | BooleanProperty | ReferenceProperty | GeopointProperty | DateProperty | MapProperty<{ [Key: string]: any; }> | ArrayProperty<CMSType[], any> | ResolvedStringProperty | ResolvedNumberProperty | ResolvedBooleanProperty | ResolvedReferenceProperty | ResolvedGeopointProperty | ResolvedTimestampProperty | ResolvedMapProperty<{ [Key: string]: any; }> | ResolvedArrayProperty<CMSType[], any>

The CMS property you are binding this field to

Defined in

lib/src/models/fields.tsx:159


propertyKey

propertyKey: string

The name of the property, such as age. You can use nested and array indexed such as address.street or people[3]

Defined in

lib/src/models/fields.tsx:154


shouldAlwaysRerender

Optional shouldAlwaysRerender: boolean

This flag is used to avoid using Formik FastField internally, which prevents being updated from the values. Set this value to true if you are developing a custom field which value gets updated dynamically based on others.

Defined in

lib/src/models/fields.tsx:205


tableMode

Optional tableMode: boolean

Is this field being rendered in a table

Defined in

lib/src/models/fields.tsx:181


underlyingValueHasChanged

Optional underlyingValueHasChanged: boolean

Has the value of this property been updated in the database while this field is being edited

Defined in

lib/src/models/fields.tsx:176