Skip to content

Commit 31d41c9

Browse files
committed
fix(chip): fix placeholder and text overlap
1 parent 541a95e commit 31d41c9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/lib/chips/chip-input.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface MatChipInputEvent {
2929
'(keydown)': '_keydown($event)',
3030
'(blur)': '_blur()',
3131
'(focus)': '_focus()',
32+
'(input)': '_onInput()',
3233
}
3334
})
3435
export class MatChipInput {
@@ -68,7 +69,7 @@ export class MatChipInput {
6869

6970
get empty(): boolean {
7071
let value: string | null = this._inputElement.value;
71-
return value == null || value === '';
72+
return (value == null || value === '');
7273
}
7374

7475
/** The native input element to which this directive is attached. */
@@ -115,5 +116,10 @@ export class MatChipInput {
115116
}
116117
}
117118

119+
_onInput() {
120+
// Let chip list know whenever the value changes.
121+
this._chipList.stateChanges.next();
122+
}
123+
118124
focus() { this._inputElement.focus(); }
119125
}

0 commit comments

Comments
 (0)