SelectBoxBinding
Defined in: SelectBoxBinding.ts:4, SelectBoxBinding.ts:45
Binding for select elements
Key features:
- Supports single and multiple selection
- Handles option changes
- Manages error states and ARIA attributes
Implements
Section titled “Implements”FormBinding
Config
Section titled “Config”Config =
object& ({getter: () =>string;multiple?:false;setter: (value:string) =>void; } | {getter: () =>string[];multiple:true;setter: (value:string[]) =>void; })
Defined in: SelectBoxBinding.ts:10
Type Declaration
Section titled “Type Declaration”
optionalid?:Attrs["id"]
[Override] ID of the input element
onChange?
Section titled “onChange?”
optionalonChange?:Attrs["onChange"]
[Extend] Change handler
onFocus?
Section titled “onFocus?”
optionalonFocus?:Attrs["onFocus"]
[Extend] Focus handler
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ getter: () => string; multiple?: false; setter: (value: string) => void; }
getter
Section titled “getter”getter: () =>
string
Get the value from the model
Returns
Section titled “Returns”string
multiple?
Section titled “multiple?”
optionalmultiple?:false
Whether multiple options can be selected in the list
setter
Section titled “setter”setter: (
value:string) =>void
Set the value to the model
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”void
Type Literal
Section titled “Type Literal”{ getter: () => string[]; multiple: true; setter: (value: string[]) => void; }
getter
Section titled “getter”getter: () =>
string[]
Get the value from the model
Returns
Section titled “Returns”string[]
multiple
Section titled “multiple”multiple:
true
Whether multiple options can be selected in the list
setter
Section titled “setter”setter: (
value:string[]) =>void
Set the value to the model
Parameters
Section titled “Parameters”string[]
Returns
Section titled “Returns”void
Constructor
Section titled “Constructor”new SelectBoxBinding(
field,config):SelectBoxBinding
Defined in: SelectBoxBinding.ts:46
Parameters
Section titled “Parameters”FormField
config
Section titled “config”Returns
Section titled “Returns”SelectBoxBinding
Members
Section titled “Members”config
Section titled “config”config:
SelectBoxBinding.Config
Defined in: SelectBoxBinding.ts:48
Implementation of
Section titled “Implementation of”FormBinding.config
onChange
Section titled “onChange”onChange:
ChangeEventHandler<HTMLSelectElement,HTMLSelectElement>
Defined in: SelectBoxBinding.ts:58
@action
onFocus
Section titled “onFocus”onFocus:
FocusEventHandler<HTMLSelectElement>
Defined in: SelectBoxBinding.ts:68
errorMessages
Section titled “errorMessages”Get Signature
Section titled “Get Signature”get errorMessages():
string|null
Defined in: SelectBoxBinding.ts:74
Returns
Section titled “Returns”string | null
@computed
Get Signature
Section titled “Get Signature”get props():
object
Defined in: SelectBoxBinding.ts:79
Binding properties which passed to the view component
Returns
Section titled “Returns”object
aria-errormessage
Section titled “aria-errormessage”aria-errormessage:
string|undefined
aria-invalid
Section titled “aria-invalid”aria-invalid:
boolean|undefined
id:
string
multiple
Section titled “multiple”multiple:
boolean|undefined
onChange
Section titled “onChange”onChange:
ChangeEventHandler<HTMLSelectElement,HTMLSelectElement>
onFocus
Section titled “onFocus”onFocus:
FocusEventHandler<HTMLSelectElement>
value:
string|number| readonlystring[]
Implementation of
Section titled “Implementation of”FormBinding.props
Get Signature
Section titled “Get Signature”get value():
string|number| readonlystring[]
Defined in: SelectBoxBinding.ts:53
Returns
Section titled “Returns”string | number | readonly string[]