Support Menu

Interface IComponentOptionsNumberOptionArgs

Interface IComponentOptionsNumberOptionArgs

This represent the possible parameters that can be used to configure a number option.

Index

Properties

Optional alias

alias: string | string[]

Allow to specify an alias for an option name.

This can be useful to modify the name of an option without introducing a breaking change.

Optional attrName

attrName: string

Allow to specify a different markup name for an option than the default value.

Using this is extremely rare, and should be used only for legacy reasons.

Optional defaultFunction

defaultFunction: function

Specify a function which should return the default value that should be given to the option if it is not specified.

param

The HTMLElement on which the current option is being parsed.

Type declaration

    • (element: HTMLElement): number
    • Parameters

      • element: HTMLElement

      Returns number

Optional defaultValue

defaultValue: number

Specify the default value that should be given to the option if it is not specified.

Optional depend

depend: string

Specify that an option depend on another option being enabled.

Mostly useful for the interface editor.

Optional deprecated

deprecated: string

Specify that an option is deprecated.

This string will be displayed in the console on initialization.

The message should be as clear as possible as to why this option is deprecated, and how it can be replaced.

This also mean that the option will not appear in the interface editor.

Optional float

float: boolean

Specify if the value is a floating point number.

Optional max

max: number

The maximum value that can be set for this number.

Optional min

min: number

The minimum value that can be set for this number.

Optional postProcessing

postProcessing: IComponentOptionsPostProcessing<number>

Specify a function which can be used to further modify the value for a given option after all other options have been loaded.

For example, the Facet.options.id will use this to set the default ID with the same value as the Facet.options.field.

Optional required

required: boolean

Specify if the option is "required" so that the component can do it's job properly.

For example, the Facet.options.field is required, as a facet with no field cannot function.

Optional section

section: string

Specify a section name inside which the option should appear in the interface editor.

Optional validator

validator: function

Specify a function which can be used to verify the validity of the option.

The function should return true if the option is valid, false otherwise.

param

Type declaration

    • (value: number): boolean
    • Parameters

      • value: number

      Returns boolean

Hierarchy