Skip to main content

Options

shadow

The Options element is intended for use inside the Select element and is used to display a dynamically generated list of options that is asynchronously retrieved from the specified URL.

note

For more information on using Options, navigate to the Select element documentation

Attributes and Properties

optionArrayPath

DescriptionThe path to the options field in the response from the server.
Attributeoption-array-path
Typestring
Defaultdata
DescriptionThe amount of the drop-down list of options.
Attributedropdown-height
Typestring
Default100%

itemValue

DescriptionThe name of the property to use as the option value.
Attributeitem-value
Typestring
Defaultvalue

itemText

DescriptionThe name of the property to use as the option text.
Attributeitem-text
Typestring
Defaulttext

lazyLoadSize

DescriptionThe number of items loaded during lazy loading.
Attributelazy-load-size
Typenumber
Default10
DescriptionSearch string for filtering options.
Attributesearch
Typestring
Defaultundefined

searchToQueryParams

DescriptionSpecifies whether to add the search string to the URL parameters.
Attributesearch-to-query-params
Typeboolean
Defaultundefined

searchParamName

DescriptionThe name of the parameter to search in the URL.
Attributesearch-param-name
Typestring
Defaultsearch

queryParams

DescriptionAdditional parameters for URL query.
Attributequery-params
Typestring
Defaultundefined

lazy

DescriptionSpecifies whether to use lazy option loading.
Attributelazy
Typeboolean
Defaultundefined

Events

NameDescription
wje-options:loadCalled after loading the options.

Methods

findSelectedOptionData

DescriptionSearches for data about the selected options based on the specified option values.
SignaturefindSelectedOptionData(selectedOptionValues: Array) => Array

addOption

DescriptionAdds an option to the element.
SignatureaddOption(optionData: object) => void

addOptions

DescriptionAdds more options to the element.
SignatureaddOptions(optionsData: Array, silent?: boolean) => void

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

No CSS custom properties available for this component.

Slots

NameDescription
``Default slot options.