Groups hylo-checkbox components.

Slots:

  • "description"
  • default

Properties

announcementSilent: boolean = null

Turns off the screen reader announcement.

By default it is silent when "radio" is set since the screen reader has its own announcement and it is not silent when multiple selections are possible.

A checkbox must have a label assigned to it in order to be read.

disabled: boolean

Is the group disabled.

errorMessageId: string

The id of an element which holds an error message for this component. The error message is only considered when the component is invalid.

forceSelection: boolean

If set, the user will not be able to unselect a checked checkbox. Only by selecting another checkbox in radio mode, the current checked checkbox will get unselected.

hideEmpty: boolean

Hides the first hylo-checkbox component which value results in "false"/is empty.

invalid: boolean = null

If not set, the component determents its invalidation based on "required" and grouped checked checkboxes and their values.

radio: boolean

If set, maximal one checkbox in the group can be selected. If the group contains hylo-checkbox components with values which result in "false"/are empty, the first one will be hidden and always selected if none other is.

required: boolean

Is the group required.

Methods

  • Removes all input fields of type "checkbox" and all input fields of type "hidden" with no value which are wrapped by this component.

    Returns Promise<void>

  • Returns the value of the first checked checkbox. The value needs to be result in "true" to be considered.

    Returns Promise<string>

  • Returns an array of all checked checkbox values.

    Returns Promise<any[]>

  • Checks all checkboxes which values are in the provided array. Unchecks the rest.

    Parameters

    • values: string[]

    Returns Promise<void>

Generated using TypeDoc