bug(chips): fixes placeholder in chip inputs #7481 (#7509)

* bug(chips): fixes placeholder in chip inputs #7481

* chore(nit): pr feedback

* chore(tests): fix invalid test

* chore(test): remove 'f'
This commit is contained in:
Austin
2017-10-12 14:39:43 -05:00
committed by Andrew Seguin
parent 160a511e61
commit 3de57fb1a4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -366,9 +366,9 @@ describe('MatChipList', () => {
});
it('should not float placeholder if no chip is selected', () => {
it('should float placeholder if chip is selected', () => {
expect(formField.classList.contains('mat-form-field-should-float'))
.toBe(false, 'placeholder should not be floating');
.toBe(true, 'placeholder should be floating');
});
it('should remove selection if chip has been removed', async(() => {
+1 -1
View File
@@ -244,7 +244,7 @@ export class MatChipList implements MatFormFieldControl<any>, ControlValueAccess
}
get shouldPlaceholderFloat(): boolean {
return this.empty;
return !this.empty || this.focused;
}
/** Whether this chip-list is disabled. */