We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 541a95e commit 31d41c9Copy full SHA for 31d41c9
src/lib/chips/chip-input.ts
@@ -29,6 +29,7 @@ export interface MatChipInputEvent {
29
'(keydown)': '_keydown($event)',
30
'(blur)': '_blur()',
31
'(focus)': '_focus()',
32
+ '(input)': '_onInput()',
33
}
34
})
35
export class MatChipInput {
@@ -68,7 +69,7 @@ export class MatChipInput {
68
69
70
get empty(): boolean {
71
let value: string | null = this._inputElement.value;
- return value == null || value === '';
72
+ return (value == null || value === '');
73
74
75
/** The native input element to which this directive is attached. */
@@ -115,5 +116,10 @@ export class MatChipInput {
115
116
117
118
119
+ _onInput() {
120
+ // Let chip list know whenever the value changes.
121
+ this._chipList.stateChanges.next();
122
+ }
123
+
124
focus() { this._inputElement.focus(); }
125
0 commit comments