fix(forms): add select multiple accessor as built-in accessor
This commit is contained in:
parent
c369bc747d
commit
9f00a1b902
|
@ -23,6 +23,7 @@ import {normalizeAsyncValidator, normalizeValidator} from './normalize_validator
|
|||
import {NumberValueAccessor} from './number_value_accessor';
|
||||
import {RadioControlValueAccessor} from './radio_control_value_accessor';
|
||||
import {SelectControlValueAccessor} from './select_control_value_accessor';
|
||||
import {SelectMultipleControlValueAccessor} from './select_multiple_control_value_accessor';
|
||||
import {AsyncValidatorFn, ValidatorFn} from './validators';
|
||||
|
||||
|
||||
|
@ -98,6 +99,7 @@ export function selectValueAccessor(
|
|||
} else if (
|
||||
hasConstructor(v, CheckboxControlValueAccessor) || hasConstructor(v, NumberValueAccessor) ||
|
||||
hasConstructor(v, SelectControlValueAccessor) ||
|
||||
hasConstructor(v, SelectMultipleControlValueAccessor) ||
|
||||
hasConstructor(v, RadioControlValueAccessor)) {
|
||||
if (isPresent(builtinAccessor))
|
||||
_throwError(dir, 'More than one built-in value accessor matches');
|
||||
|
|
|
@ -24,6 +24,7 @@ import {NumberValueAccessor} from './number_value_accessor';
|
|||
import {RadioControlValueAccessor} from './radio_control_value_accessor';
|
||||
import {FormArrayName} from './reactive_directives/form_array_name';
|
||||
import {SelectControlValueAccessor} from './select_control_value_accessor';
|
||||
import {SelectMultipleControlValueAccessor} from './select_multiple_control_value_accessor';
|
||||
import {AsyncValidatorFn, ValidatorFn} from './validators';
|
||||
|
||||
|
||||
|
@ -100,6 +101,7 @@ export function selectValueAccessor(
|
|||
} else if (
|
||||
hasConstructor(v, CheckboxControlValueAccessor) || hasConstructor(v, NumberValueAccessor) ||
|
||||
hasConstructor(v, SelectControlValueAccessor) ||
|
||||
hasConstructor(v, SelectMultipleControlValueAccessor) ||
|
||||
hasConstructor(v, RadioControlValueAccessor)) {
|
||||
if (isPresent(builtinAccessor))
|
||||
_throwError(dir, 'More than one built-in value accessor matches');
|
||||
|
|
Loading…
Reference in New Issue