Skip to content

CheckBoxBinding

Defined in: CheckBoxBinding.ts:5, CheckBoxBinding.ts:35

Binding for checkbox input elements

Key features:

  • Handles boolean states
  • Manages error states and ARIA attributes
  • FormBinding

Config = object

Defined in: CheckBoxBinding.ts:11

optional aria-describedby?: Attrs["aria-describedby"]

Defined in: CheckBoxBinding.ts:24

[Extend] IDs of the elements describing the checkbox; the ID of the error text is added while errors are reported

getter: () => boolean

Defined in: CheckBoxBinding.ts:13

Get the value from the model

boolean

optional id?: Attrs["id"]

Defined in: CheckBoxBinding.ts:18

[Override] ID of the input element

optional onChange?: Attrs["onChange"]

Defined in: CheckBoxBinding.ts:20

[Extend] Change handler

optional onFocus?: Attrs["onFocus"]

Defined in: CheckBoxBinding.ts:22

[Extend] Focus handler

setter: (value: boolean) => void

Defined in: CheckBoxBinding.ts:15

@action

Set the value to the model

boolean

void

new CheckBoxBinding(field, config): CheckBoxBinding

Defined in: CheckBoxBinding.ts:36

FormField

CheckBoxBinding.Config

CheckBoxBinding

config: CheckBoxBinding.Config

Defined in: CheckBoxBinding.ts:38

FormBinding.config


onChange: ChangeEventHandler<HTMLInputElement, HTMLInputElement>

Defined in: CheckBoxBinding.ts:48

@action


onFocus: FocusEventHandler<HTMLInputElement>

Defined in: CheckBoxBinding.ts:54


get checked(): boolean

Defined in: CheckBoxBinding.ts:43

boolean


get errorMessages(): string | null

Defined in: CheckBoxBinding.ts:60

string | null

@computed


get props(): object

Defined in: CheckBoxBinding.ts:65

Binding properties which passed to the view component

object

aria-describedby: string | undefined

aria-errormessage: string | undefined

aria-invalid: boolean | undefined

checked: boolean

id: string

onChange: ChangeEventHandler<HTMLInputElement, HTMLInputElement>

onFocus: FocusEventHandler<HTMLInputElement>

type: "checkbox" = "checkbox"

FormBinding.props