Skip to main content

RadioGroup

shadow

RadioGroup slúži ako kontajner pre skupinu radio tlačidiel. Umožňuje používateľom vybrať jednu možnosť zo súboru možností, pričom sa zabezpečí, že v danom okamihu bude vybrané iba jedno rádiové tlačidlo v rámci skupiny. Komponent podporuje atribút inline, ktorý po nastavení usporiada rádiové tlačidlá v horizontálnom rozložení. Okrem toho programovo spravuje atribút value, ktorý reflektuje hodnotu práve vybraného rádiového tlačidla.

Atribúty a Vlastnosti

value

DescriptionThe value of the currently selected radio button in the group.
Attributevalue
Typestring
Defaultundefined

inline

DescriptionIf set, the radio buttons will appear in a row instead of a column.
Attributeinline
Typeboolean
Defaultfalse

name

DescriptionThe name of the radio button group used when submitting the form.
Attributename
Typestring
Defaultundefined

Eventy

NameDescription
wje-radio:changeIssued when the selected radio button in the group is changed.

Metódy

getAllElements

DescriptionReturns all direct child elements of the current element.
SignaturegetAllElements() => HTMLElement[]

CheckRadio

DescriptionMarks the radio button with the given value.
SignaturecheckRadio(value: string) => boolean

removeCheck

DescriptionRemoves the marking from all radio buttons.
SignatureremoveCheck() => void

getRadioByValue

DescriptionReturns the radio button with the given value.
SignaturegetRadioByValue(value: string) => Radio

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Vlastnosti

No CSS custom properties available for this component.

Sloty

NameDescription
``Default location for radio buttons.