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.
For more information on using Options, navigate to the [Select] element documentation(./select)
When to use
Use wje-select-options when you want to solve a given UI problem consistently within the WebJET design system.
When not to use
Do not use a component outside of its responsibility; in an unusual case, prefer to assemble multiple smaller components.
Accessibility
Check keyboard controls, focus states, contrast and clear naming of interactive elements.
Recommended practices
- Prefer API component over manual DOM interventions.
- Stick to design tokens and consistent naming conventions.
- Before deployment, test the component in real data scenarios.
Attributes and properties
attached
| Popis | Riadi správanie voľby attached v komponente. |
| Atribút | attached |
| Typ | any |
| Predvolené | - |
dropdownHeight
| Popis | Nastavuje rozmery alebo veľkosť pre voľbu dropdown-height. |
| Atribút | dropdown-height |
| Typ | string |
| Predvolené | 100% |
itemText
| Popis | Nastavuje zobrazovaný text pre voľbu item-text. |
| Atribút | item-text |
| Typ | string |
| Predvolené | text |
itemValue
| Popis | Nastavuje textovú hodnotu uloženú vo voľbe item-value. |
| Atribút | item-value |
| Typ | string |
| Predvolené | value |
lazy
| Popis | Určuje, či je voľba lazy zapnutá a ovplyvňuje správanie komponentu. |
| Atribút | lazy |
| Typ | boolean |
| Predvolené | false |
lazyLoadSize
| Popis | Nastavuje rozmery alebo veľkosť pre voľbu lazy-load-size. |
| Atribút | lazy-load-size |
| Typ | number |
| Predvolené | 10 |
optionArrayPath
| Popis | Nastavuje odkaz na zdroj pre voľbu option-array-path. |
| Atribút | option-array-path |
| Typ | string |
| Predvolené | false |
queryParams
| Popis | Nastavuje textovú hodnotu uloženú vo voľbe query-params. |
| Atribút | query-params |
| Typ | string |
| Predvolené | - |
search
| Popis | Nastavuje textovú hodnotu uloženú vo voľbe search. |
| Atribút | search |
| Typ | string |
| Predvolené | false |
searchParamName
| Popis | Nastavuje textovú hodnotu uloženú vo voľbe search-param-name. |
| Atribút | search-param-name |
| Typ | string |
| Predvolené | search |
searchToQueryParams
| Popis | Nastavuje textovú hodnotu uloženú vo voľbe search-to-query-params. |
| Atribút | search-to-query-params |
| Typ | string | null |
| Predvolené | false |
Events
| Názov | Popis |
|---|---|
wje-options:load | Vyvolá sa po dokončení asynchrónneho načítania obsahu. |
Methods
addOption
| Popis | Pridá položku do spravovanej kolekcie komponentu. |
| Signatúra | (optionData: object) => void |
addOptions
| Popis | Pridá položky do spravovanej kolekcie komponentu. |
| Signatúra | (optionsData: Array, silent?: boolean) => void |
CSS shadow parts
Pre tento komponent nie sú dostupné žiadne CSS časti tieňa.
CSS custom variables
Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.
Slots
Pre tento komponent nie sú dostupné žiadne sloty.