Skip to content

Commit

Permalink
fix(material): add FieldType set value (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
aitboudad committed Apr 7, 2019
1 parent 8200078 commit 93268e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/material/form-field/src/field.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export abstract class FieldType<F extends FormlyFieldConfig = FormlyFieldConfig>
get placeholder() { return this.to.placeholder || ''; }
get shouldPlaceholderFloat() { return this.shouldLabelFloat; }
get value() { return this.formControl.value; }
set value(value) { this.formControl.patchValue(value); }
get ngControl() { return this.formControl as any; }
get empty() { return !this.formControl.value; }
get shouldLabelFloat() { return this.focused || !this.empty; }
Expand Down

0 comments on commit 93268e4

Please sign in to comment.