Skip to main content
Version: 2.0.0

Interface: NumberProperty

Hierarchy

Properties

Field

Optional Field: ComponentType<FieldProps<number, 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

packages/firecms/src/types/properties.ts:133


Preview

Optional Preview: ComponentType<PropertyPreviewProps<number, any, Record<string, 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

packages/firecms/src/types/properties.ts:140


clearable

Optional clearable: boolean

Add an icon to clear the value and set it to null. Defaults to false

Defined in

packages/firecms/src/types/properties.ts:315


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

packages/firecms/src/types/properties.ts:99


customProps

Optional customProps: any

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

Inherited from

BaseProperty.customProps

Defined in

packages/firecms/src/types/properties.ts:146


dataType

dataType: "number"

Datatype of the property

Overrides

BaseProperty.dataType

Defined in

packages/firecms/src/types/properties.ts:298


defaultValue

Optional defaultValue: number

This value will be set by default for new entities.

Inherited from

BaseProperty.defaultValue

Defined in

packages/firecms/src/types/properties.ts:151


description

Optional description: string

Property description, always displayed under the field

Inherited from

BaseProperty.description

Defined in

packages/firecms/src/types/properties.ts:80


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

packages/firecms/src/types/properties.ts:119


enumValues

Optional enumValues: EnumValues

You can use the enum values providing a map of possible exclusive values the property can take, mapped to the label that it is displayed in the dropdown.

Defined in

packages/firecms/src/types/properties.ts:305


fieldConfig

Optional fieldConfig: string

You can use this prop to reuse a property that has been defined in the top level of the CMS in the prop fields. All the configuration will be taken from the inherited config, and overwritten by the current property config.

Inherited from

BaseProperty.fieldConfig

Defined in

packages/firecms/src/types/properties.ts:88


hideFromCollection

Optional hideFromCollection: boolean

Do not show this property in the collection view

Inherited from

BaseProperty.hideFromCollection

Defined in

packages/firecms/src/types/properties.ts:104


longDescription

Optional longDescription: string

Longer description of a field, displayed under a popover

Inherited from

BaseProperty.longDescription

Defined in

packages/firecms/src/types/properties.ts:93


name

Optional name: string

Property name (e.g. Product)

Inherited from

BaseProperty.name

Defined in

packages/firecms/src/types/properties.ts:75


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

packages/firecms/src/types/properties.ts:110


validation

Optional validation: NumberPropertyValidationSchema

Rules for validating this property

Overrides

BaseProperty.validation

Defined in

packages/firecms/src/types/properties.ts:310

Enterprise or start-up?

Learn how to get the most out of your project with the help of our consulting team.
Learn more
Sign up to our newsletter to get the latest news and updates. No spam!