Home Reference Source
import SelectComponent from 'formiojs/src/components/select/Select.js'
public class | source

SelectComponent

Extends:

src/components/_classes/component/Component.js~ComponentField → SelectComponent

Direct Subclass:

ResourceComponent

Static Member Summary

Static Public Members
public static get

builderInfo: {"title": string, "group": string, "icon": string, "weight": number, "documentation": string, "schema": *}

Static Method Summary

Static Public Methods
public static

schema(extend: ...*): *

Member Summary

Public Members
public
public get

active: *

public get
public

choices: *

public get
public
public get
public
public set
public get
public get
public set
public get
public
public get
public
public get
public get
public
public get
public get
public
public
public
public
public get

Get the request headers for this select dropdown.

public
public
public
public
public get
public set
public get
public
public
public

value: *

public get
public set
public get

visible: *

Method Summary

Public Methods
public

Activate this select control.

public

addCurrentChoices(value: *, items: Array): *

public

addOption(value: *, label: *)

Adds an option to the select dropdown.

public
public

addPlaceholderItem(placeholderValue: *)

public

addValueOptions(items: *): *

public

asString(value: *): *

public

attach(element: *): *

public
public

choicesOptions(): {"removeItemButton": *, "itemSelectText": *, "classNames": *, "addItemText": *, "placeholder": *, "placeholderValue": *, "noResultsText": *, "noChoicesText": *, "searchPlaceholderValue": *, "shouldSort": *, "position": *, "searchEnabled": *, "searchChoices": *, "searchFields": *, "fuseOptions": *, "valueComparer": *, "resetScrollPosition": *, ...customOptions: Object}

public

Deletes the value of the component.

public

detach()

public
public

focus()

public
public
public

getOptionValue(value: *): *

Performs required transformations on the initial value to use in selectOptions

public

getOptionsValues(): Array<*> | undefiened

If component has static values (values, json) or custom values, returns an array of them

public

getValue(): *

public

getValueAsString(data: *): *

public

init()

public

isBooleanOrNumber(value: *): *

Output this select dropdown as a string value.

public
public

isInitApiCallNeeded(hasValue: *): *

public

itemTemplate(data: *): *

public

loadItems(url: *, search: *, headers: *, options: *, method: *, body: *): *

public

normalizeSingleValue(value: *): *

public

normalizeValue(value: *): *

Normalize values coming into updateValue.

public
public

redraw(): *

public

refresh(value: *, objectPattern1: {"instance": *})

public

render(): *

public

setChoicesValue(value: *, hasPreviousValue: *, flags: {})

public

setErrorClasses(elements: *, dirty: *, hasError: *)

public

setItems(items: *, fromSearch: *)

public

setLoadingItem(addToCurrentList: boolean)

public

setValue(value: *, flags: {}): *

public

update()

public
public

updateItems(searchInput: *, forceUpdate: *)

public

Check if a component is eligible for multiple validation

public

validateValueAvailability(setting: *, value: *): boolean

public

wrapElement(element: *): *

Inherited Summary

From class Field
public

render(element: *): *

Static Public Members

public static get builderInfo: {"title": string, "group": string, "icon": string, "weight": number, "documentation": string, "schema": *} source

Static Public Methods

public static schema(extend: ...*): * source

Params:

NameTypeAttributeDescription
extend ...*

Return:

*

Public Members

public activated: boolean source

public get active: * source

public get additionalResourcesAvailable: * source

public choices: * source

public get dataReady: * source

public defaultDownloadedResources: *[] source

public get defaultSchema: * source

public defaultServerCount: * source

public set disabled source

public get disabled: * source

public get downloadedResources: * source

public set downloadedResources source

public get emptyValue: {} source

public focusableElement: * source

public get inputInfo: * source

public isFromSearch: boolean source

public get isInfiniteScrollProvided: * source

public get isLoadingAvailable: * source

public isScrollLoading: boolean source

public get isSelectResource: * source

public get isSelectURL: * source

public itemsLoaded: * source

public itemsLoadedResolve: * source

public lazyLoadInit: boolean source

public loading: boolean source

public get requestHeaders: * source

Get the request headers for this select dropdown.

public scrollList: * source

public searchDownloadedResources: *[] source

public searchServerCount: * source

public selectOptions: *[] source

public get serverCount: * source

public set serverCount source

public get shouldDisabled: * source

public triggerUpdate: * source

public validators: * source

public value: * source

public get valueProperty: string source

public set visible source

public get visible: * source

Public Methods

public activate() source

Activate this select control.

public addCurrentChoices(value: *, items: Array): * source

Params:

NameTypeAttributeDescription
value *
items Array

Return:

*

public addOption(value: *, label: *) source

Adds an option to the select dropdown.

Params:

NameTypeAttributeDescription
value *
label *

public addPlaceholder() source

public addPlaceholderItem(placeholderValue: *) source

Params:

NameTypeAttributeDescription
placeholderValue *

public addValueOptions(items: *): * source

Params:

NameTypeAttributeDescription
items *

Return:

*

public asString(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

public attach(element: *): * source

Params:

NameTypeAttributeDescription
element *

Return:

*

public attachRefreshOnBlur() source

public choicesOptions(): {"removeItemButton": *, "itemSelectText": *, "classNames": *, "addItemText": *, "placeholder": *, "placeholderValue": *, "noResultsText": *, "noChoicesText": *, "searchPlaceholderValue": *, "shouldSort": *, "position": *, "searchEnabled": *, "searchChoices": *, "searchFields": *, "fuseOptions": *, "valueComparer": *, "resetScrollPosition": *, ...customOptions: Object} source

Return:

{"removeItemButton": *, "itemSelectText": *, "classNames": *, "addItemText": *, "placeholder": *, "placeholderValue": *, "noResultsText": *, "noChoicesText": *, "searchPlaceholderValue": *, "shouldSort": *, "position": *, "searchEnabled": *, "searchChoices": *, "searchFields": *, "fuseOptions": *, "valueComparer": *, "resetScrollPosition": *, ...customOptions: Object}

public deleteValue() source

Deletes the value of the component.

public detach() source

public disableInfiniteScroll() source

public focus() source

public getCustomItems(): * source

Return:

*

public getNormalizedValues(): * source

Return:

*

public getOptionValue(value: *): * source

Performs required transformations on the initial value to use in selectOptions

Params:

NameTypeAttributeDescription
value *

Return:

*

public getOptionsValues(): Array<*> | undefiened source

If component has static values (values, json) or custom values, returns an array of them

Return:

Array<*> | undefiened

public getValue(): * source

Return:

*

public getValueAsString(data: *): * source

Params:

NameTypeAttributeDescription
data *

Return:

*

public init() source

public isBooleanOrNumber(value: *): * source

Output this select dropdown as a string value.

Params:

NameTypeAttributeDescription
value *

Return:

*

public isEntireObjectDisplay(): * source

Return:

*

public isInitApiCallNeeded(hasValue: *): * source

Params:

NameTypeAttributeDescription
hasValue *

Return:

*

public itemTemplate(data: *): * source

Params:

NameTypeAttributeDescription
data *

Return:

*

public loadItems(url: *, search: *, headers: *, options: *, method: *, body: *): * source

Params:

NameTypeAttributeDescription
url *
search *
headers *
options *
method *
body *

Return:

*

public normalizeSingleValue(value: *): * source

Params:

NameTypeAttributeDescription
value *

Return:

*

public normalizeValue(value: *): * source

Normalize values coming into updateValue.

Params:

NameTypeAttributeDescription
value *

Return:

*

public onScroll() source

public redraw(): * source

Return:

*

public refresh(value: *, objectPattern1: {"instance": *}) source

Params:

NameTypeAttributeDescription
value *
objectPattern1 {"instance": *}
  • default: {"instance":null}

public render(): * source

Override:

Field#render

Return:

*

public setChoicesValue(value: *, hasPreviousValue: *, flags: {}) source

Params:

NameTypeAttributeDescription
value *
hasPreviousValue *
flags {}
  • optional
  • default: {}

public setErrorClasses(elements: *, dirty: *, hasError: *) source

Params:

NameTypeAttributeDescription
elements *
dirty *
hasError *

public setItems(items: *, fromSearch: *) source

Params:

NameTypeAttributeDescription
items *
fromSearch *

public setLoadingItem(addToCurrentList: boolean) source

Params:

NameTypeAttributeDescription
addToCurrentList boolean
  • optional
  • default: false

public setValue(value: *, flags: {}): * source

Params:

NameTypeAttributeDescription
value *
flags {}
  • optional
  • default: {}

Return:

*

public update() source

public updateCustomItems() source

public updateItems(searchInput: *, forceUpdate: *) source

Params:

NameTypeAttributeDescription
searchInput *
forceUpdate *

public validateMultiple(): boolean source

Check if a component is eligible for multiple validation

Return:

boolean

public validateValueAvailability(setting: *, value: *): boolean source

Params:

NameTypeAttributeDescription
setting *
value *

Return:

boolean

public wrapElement(element: *): * source

Params:

NameTypeAttributeDescription
element *

Return:

*