Support Menu

Interface IComponentOptionsFieldsOptionArgs

This represent the possible parameters that can be used to configure a list of fields option.

Index

Properties

Optional alias

alias: 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): string[]
    • Parameters

      • element: HTMLElement

      Returns string[]

Optional defaultValue

defaultValue: string[]

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 postProcessing

postProcessing: IComponentOptionsPostProcessing<string[]>

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: string[]): boolean
    • Parameters

      • value: string[]

      Returns boolean

Hierarchy