refactor(form-field): remove shouldPlaceholderFloat on MatFormFieldControl (#10293)

This commit is contained in:
mmalerba
2018-03-09 07:32:38 -08:00
committed by Jeremy Elbourn
parent 96b1366317
commit 4a84a6732e
3 changed files with 3 additions and 11 deletions
+1 -8
View File
@@ -37,14 +37,7 @@ export abstract class MatFormFieldControl<T> {
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;
+1 -2
View File
@@ -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() {
+1 -1
View File
@@ -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;
}
}