Skip to content

CheckBoxBinding

Defined in: CheckBoxBinding.ts:4, CheckBoxBinding.ts:32

Binding for checkbox input elements

Key features:

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

Config = object

Defined in: CheckBoxBinding.ts:10

getter: () => boolean

Defined in: CheckBoxBinding.ts:12

Get the value from the model

boolean

optional id?: Attrs["id"]

Defined in: CheckBoxBinding.ts:17

[Override] ID of the input element

optional onChange?: Attrs["onChange"]

Defined in: CheckBoxBinding.ts:19

[Extend] Change handler

optional onFocus?: Attrs["onFocus"]

Defined in: CheckBoxBinding.ts:21

[Extend] Focus handler

setter: (value: boolean) => void

Defined in: CheckBoxBinding.ts:14

@action

Set the value to the model

boolean

void

new CheckBoxBinding(field, config): CheckBoxBinding

Defined in: CheckBoxBinding.ts:33

FormField

CheckBoxBinding.Config

CheckBoxBinding

config: CheckBoxBinding.Config

Defined in: CheckBoxBinding.ts:35

FormBinding.config


onChange: ChangeEventHandler<HTMLInputElement, HTMLInputElement>

Defined in: CheckBoxBinding.ts:45

@action


onFocus: FocusEventHandler<HTMLInputElement>

Defined in: CheckBoxBinding.ts:51


get checked(): boolean

Defined in: CheckBoxBinding.ts:40

boolean


get errorMessages(): string | null

Defined in: CheckBoxBinding.ts:57

string | null

@computed


get props(): object

Defined in: CheckBoxBinding.ts:62

Binding properties which passed to the view component

object

aria-errormessage: string | undefined

aria-invalid: boolean | undefined

checked: boolean

id: string

onChange: ChangeEventHandler<HTMLInputElement, HTMLInputElement>

onFocus: FocusEventHandler<HTMLInputElement>

type: "checkbox" = "checkbox"

FormBinding.props