Type alias: FieldConfig<T>
Ƭ FieldConfig<T
>: Object
This is the configuration object for the field component generated for a property. These configs are generated by default for the properties defined in your collections' configuration, but you can define your own to be used
Type parameters
Name | Type |
---|---|
T | extends CMSType = any |
Type declaration
Name | Type | Description |
---|---|---|
Field? | React.ComponentType <FieldProps <T >> | You can define a custom Field component to be used for this field. Your custom Field is responsible for rendering the property value and updating it when the user changes it. |
Icon? | React.ComponentType <SvgIconProps > | - |
color? | string | CSS color, used only in some plugins like the field selector. e.g. "#2d7ff9" |
dataType | DataType | Data type related to this field. |
defaultProperty? | PropertyOrBuilder <T > | You can define a default config for the property. Whenever this field is used, this property or builder will be used as the base values for the resulting property. Any props that are defined in the property will override the ones specified in baseProperty . You can also use a builder function to generate the base property. |
description? | string | Description of this field type. |
name | string | Name of this field type. This is not the name of the property. |