We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72a6b7f commit 5916765Copy full SHA for 5916765
src/material/form-field/src/field.type.ts
@@ -79,7 +79,7 @@ export abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig>
79
get value() { return this.formControl.value; }
80
set value(value) { this.formControl.patchValue(value); }
81
get ngControl() { return this.formControl as any; }
82
- get empty() { return !this.formControl.value; }
+ get empty() { return this.value === undefined || this.value === null || this.value === ''; }
83
get shouldLabelFloat() { return this.focused || !this.empty; }
84
get formField(): MatFormField { return this.field ? (<any>this.field)['__formField__'] : null; }
85
}
0 commit comments