Skip to main content

Option

shadow

Element Option predstavuje jednotlivé voliteľné možnosti v rámci komponentu Select. Je obdobný štandardnému elementu HTML select a umožňuje používateľom vykonať jeden alebo viacero výberov na základe konfigurácie komponentu select. Tieto elementy sa môžu dynamicky napĺňať a sú navrhnuté tak, aby bezproblémovo spolupracovali s vlastnou logikou komponentu wj-select vrátane funkcií, ako je viacnásobný výber a vlastné štylizovanie.

Pre informácie o použití Option sa presuňte do dokumentácie elementu Select.

Atribúty a Vlastnosti

selected

DescriptionIndicates whether the option is selected.
Attributeselected
Typeboolean
Defaultundefined

value

DescriptionThe option value that is used when the form is submitted.
Attributevalue
Typestring
Defaultundefined

text

DescriptionThe textual content of the option that is displayed to the user.
Attributeundefined
Typestring
Defaultundefined

disabled

DescriptionIf true, the option is disabled and cannot be selected.
Attributedisabled
Typeboolean
Defaultundefined

Eventy

NameDescription
wje-option:changeCalled when the option is clicked.

Metódy

No public methods available for this component.

CSS Shadow Parts

NameDescription
nativeNative part options.

CSS Custom Vlastnosti

NameDescription
--wje-option-padding-topTop indentation options.
--wje-option-padding-bottomLower indentation options.
--wje-option-highlightedThe color of the highlighting option when the mouse is hovered over.

Sloty

NameDescription
``Default slot for content options.
startSlot for content at the beginning of the option.
endSlot for content at the end of the option.