LiSelectControlValueAccessor class

The accessor for writing a value and listening to changes on a select element.

Note: We have to listen to the 'change' event because 'input' events aren't fired for selects in Firefox and IE: https://bugzilla.mozilla.org/show_bug.cgi?id=1024350 https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/4660045

Annotations
  • @Directive.new(selector: 'select[ngControl],select[ngFormControl],select[ngModel]', providers: [selectValueAccessorCustom], visibility: Visibility.all)

Properties

compareWith ← bool Function(Object? o1, Object? o2)
Sets the comparison function used to match option values.
no getter
enableNullValue ↔ bool
Allows null values in select options.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
onChange ↔ ChangeFunction
getter/setter pairinherited
onTouched ↔ TouchFunction
getter/setter pairinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useEquals ← bool
Uses == instead of identity for comparisons.
no getter
value ↔ Object?
getter/setter pair

Methods

handleChange(String value) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDisabledChanged(bool isDisabled) → void
This function is called when the control status changes to or from "DISABLED".
registerOnChange(ChangeFunction<Object?> f) → void
Set the function to be called when the control receives a change event.
inherited
registerOnTouched(TouchFunction fn) → void
Set the function to be called when the control receives a touch event.
inherited
toString() → String
A string representation of this object.
inherited
touchHandler() → void
inherited
writeValue(Object? value) → void
Write a new value to the element.

Operators

operator ==(Object other) → bool
The equality operator.
inherited