From 4a84a6732ed4974c729410d044515a093ff1ee63 Mon Sep 17 00:00:00 2001 From: mmalerba Date: Fri, 9 Mar 2018 07:32:38 -0800 Subject: [PATCH] refactor(form-field): remove `shouldPlaceholderFloat` on `MatFormFieldControl` (#10293) --- src/lib/form-field/form-field-control.ts | 9 +-------- src/lib/form-field/form-field.ts | 3 +-- src/lib/select/select.ts | 2 +- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/lib/form-field/form-field-control.ts b/src/lib/form-field/form-field-control.ts index ce003328e4e..a2a0a81e81b 100644 --- a/src/lib/form-field/form-field-control.ts +++ b/src/lib/form-field/form-field-control.ts @@ -37,14 +37,7 @@ export abstract class MatFormFieldControl { readonly empty: boolean; /** Whether the `MatFormField` label should try to float. */ - readonly shouldLabelFloat?: boolean; - - /** - * Whether the `MatFormField` placeholder should try to float. - * @deprecated Use `shouldLabelFloat` instead. - * @deletion-target 6.0.0 - */ - readonly shouldPlaceholderFloat?: boolean; + readonly shouldLabelFloat: boolean; /** Whether the control is required. */ readonly required: boolean; diff --git a/src/lib/form-field/form-field.ts b/src/lib/form-field/form-field.ts index 6630137fe74..ddc6727f9fc 100644 --- a/src/lib/form-field/form-field.ts +++ b/src/lib/form-field/form-field.ts @@ -316,8 +316,7 @@ export class MatFormField extends _MatFormFieldMixinBase } _shouldLabelFloat() { - return this._canLabelFloat && (this._control.shouldLabelFloat || - this._control.shouldPlaceholderFloat || this._shouldAlwaysFloat); + return this._canLabelFloat && (this._control.shouldLabelFloat || this._shouldAlwaysFloat); } _hideControlPlaceholder() { diff --git a/src/lib/select/select.ts b/src/lib/select/select.ts index ca8ccfd6a6b..ebd5ce181e8 100644 --- a/src/lib/select/select.ts +++ b/src/lib/select/select.ts @@ -1272,7 +1272,7 @@ export class MatSelect extends _MatSelectMixinBase implements AfterContentInit, * Implemented as part of MatFormFieldControl. * @docs-private */ - get shouldPlaceholderFloat(): boolean { + get shouldLabelFloat(): boolean { return this._panelOpen || !this.empty; } }