Options
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
| Description | The path to the options field in the response from the server. |
| Attribute | option-array-path |
| Type | string |
| Default | data |
dropdownHeight
| Description | The amount of the drop-down list of options. |
| Attribute | dropdown-height |
| Type | string |
| Default | 100% |
itemValue
| Description | The name of the property to use as the option value. |
| Attribute | item-value |
| Type | string |
| Default | value |
itemText
| Description | The name of the property to use as the option text. |
| Attribute | item-text |
| Type | string |
| Default | text |
lazyLoadSize
| Description | The number of items loaded during lazy loading. |
| Attribute | lazy-load-size |
| Type | number |
| Default | 10 |
search
| Description | Search string for filtering options. |
| Attribute | search |
| Type | string |
| Default | undefined |
searchToQueryParams
| Description | Specifies whether to add the search string to the URL parameters. |
| Attribute | search-to-query-params |
| Type | boolean |
| Default | undefined |
searchParamName
| Description | The name of the parameter to search in the URL. |
| Attribute | search-param-name |
| Type | string |
| Default | search |
queryParams
| Description | Additional parameters for URL query. |
| Attribute | query-params |
| Type | string |
| Default | undefined |
lazy
| Description | Specifies whether to use lazy option loading. |
| Attribute | lazy |
| Type | boolean |
| Default | undefined |
Events
| Name | Description |
|---|---|
wje-options:load | Called after loading the options. |
Methods
findSelectedOptionData
| Description | Searches for data about the selected options based on the specified option values. |
| Signature | findSelectedOptionData(selectedOptionValues: Array) => Array |
addOption
| Description | Adds an option to the element. |
| Signature | addOption(optionData: object) => void |
addOptions
| Description | Adds more options to the element. |
| Signature | addOptions(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
| Name | Description |
|---|---|
| `` | Default slot options. |