Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(chip): fix placeholder and text overlap #8468

Merged
merged 1 commit into from
Nov 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/lib/chips/chip-input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface MatChipInputEvent {
'(keydown)': '_keydown($event)',
'(blur)': '_blur()',
'(focus)': '_focus()',
'(input)': '_onInput()',
}
})
export class MatChipInput {
Expand Down Expand Up @@ -68,7 +69,7 @@ export class MatChipInput {

get empty(): boolean {
let value: string | null = this._inputElement.value;
return value == null || value === '';
return (value == null || value === '');
}

/** The native input element to which this directive is attached. */
Expand Down Expand Up @@ -115,5 +116,10 @@ export class MatChipInput {
}
}

_onInput() {
// Let chip list know whenever the value changes.
this._chipList.stateChanges.next();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a unit test for this?

}

focus() { this._inputElement.focus(); }
}