From 3cbded6694880dcdf4394ee27f8ab5ca54d9acfd Mon Sep 17 00:00:00 2001 From: Rob Wormald Date: Thu, 30 Jun 2016 20:24:39 -0700 Subject: [PATCH] fix(forms): use change event for select multiple (#9713) --- .../directives/select_multiple_control_value_accessor.ts | 4 ++-- .../src/directives/select_multiple_control_value_accessor.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/@angular/common/src/forms-deprecated/directives/select_multiple_control_value_accessor.ts b/modules/@angular/common/src/forms-deprecated/directives/select_multiple_control_value_accessor.ts index cb0bef2d39..6117a3cad5 100644 --- a/modules/@angular/common/src/forms-deprecated/directives/select_multiple_control_value_accessor.ts +++ b/modules/@angular/common/src/forms-deprecated/directives/select_multiple_control_value_accessor.ts @@ -47,7 +47,7 @@ abstract class HTMLCollection { */ @Directive({ selector: 'select[multiple][ngControl],select[multiple][ngFormControl],select[multiple][ngModel]', - host: {'(input)': 'onChange($event.target)', '(blur)': 'onTouched()'}, + host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'}, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR] }) export class SelectMultipleControlValueAccessor implements ControlValueAccessor { @@ -182,4 +182,4 @@ export class NgSelectMultipleOption implements OnDestroy { } } -export const SELECT_DIRECTIVES = [SelectMultipleControlValueAccessor, NgSelectMultipleOption]; \ No newline at end of file +export const SELECT_DIRECTIVES = [SelectMultipleControlValueAccessor, NgSelectMultipleOption]; diff --git a/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts b/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts index 7615fc57da..964627e160 100644 --- a/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts +++ b/modules/@angular/forms/src/directives/select_multiple_control_value_accessor.ts @@ -50,7 +50,7 @@ abstract class HTMLCollection { @Directive({ selector: 'select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]', - host: {'(input)': 'onChange($event.target)', '(blur)': 'onTouched()'}, + host: {'(change)': 'onChange($event.target)', '(blur)': 'onTouched()'}, providers: [SELECT_MULTIPLE_VALUE_ACCESSOR] }) export class SelectMultipleControlValueAccessor implements ControlValueAccessor { @@ -185,4 +185,4 @@ export class NgSelectMultipleOption implements OnDestroy { } } -export const SELECT_DIRECTIVES = [SelectMultipleControlValueAccessor, NgSelectMultipleOption]; \ No newline at end of file +export const SELECT_DIRECTIVES = [SelectMultipleControlValueAccessor, NgSelectMultipleOption];