Support Menu

Class RadioButton

Class RadioButton

A radio button widget with standard styling.

Index

Methods

build

  • build(): HTMLElement

getElement

  • getElement(): HTMLElement

getLabel

  • getLabel(): HTMLLabelElement

getRadio

  • getRadio(): HTMLInputElement

isSelected

  • isSelected(): boolean

reset

  • reset(): void

select

  • select(triggerChange?: boolean): void
  • Select the radio button

    Parameters

    • Default value triggerChange: boolean = true

      will trigger change event if specified and the radio button is not already selected

    Returns void

Constructors

constructor

  • new RadioButton(onChange?: function, label: string, name: any): RadioButton
  • Creates a new RadioButton.

    Parameters

    • Default value onChange: function = (radioButton: RadioButton) => {}

      The function to call when the radio button value changes. This function takes the current RadioButton instance as an argument.

    • label: string

      The label to display next to the radio button.

    • name: any

      The value to set the input HTMLElement name attribute to.

    Returns RadioButton

Hierarchy

  • RadioButton

Implements

  • IFormWidgetWithLabel
  • IFormWidgetSelectable