Support Menu

Class Checkbox

Class Checkbox

A checkbox widget with standard styling.

Index

Methods

build

  • build(): HTMLElement

getElement

  • getElement(): HTMLElement

getLabel

  • getLabel(): HTMLElement

getValue

  • getValue(): string

isSelected

  • isSelected(): boolean

reset

  • reset(): void

select

  • select(triggerChange?: boolean): void
  • Select the checkbox

    Parameters

    • Default value triggerChange: boolean = true

      will trigger change even if specified and not already selected

    Returns void

toggle

  • toggle(): void

Constructors

constructor

  • new Checkbox(onChange?: function, label: string): Checkbox
  • Creates a new Checkbox.

    Parameters

    • Default value onChange: function = (checkbox: Checkbox) => {}

      The function to call when the checkbox state changes. This function takes the current Checkbox instance as an argument.

    • label: string

      The label to display next to the checkbox.

    Returns Checkbox

Hierarchy

  • Checkbox

Implements

  • IFormWidgetWithLabel
  • IFormWidgetSelectable