Permalink
Browse files

fix(forms): use change event for select multiple (#9713)

  • Loading branch information...
1 parent 137fff9 commit 3cbded6694880dcdf4394ee27f8ab5ca54d9acfd @robwormald robwormald committed on GitHub Jul 1, 2016
@@ -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];
+export const SELECT_DIRECTIVES = [SelectMultipleControlValueAccessor, NgSelectMultipleOption];
@@ -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];
+export const SELECT_DIRECTIVES = [SelectMultipleControlValueAccessor, NgSelectMultipleOption];

0 comments on commit 3cbded6

Please sign in to comment.