Skip to content

Commit

Permalink
fix(lib): fixed control value reset
Browse files Browse the repository at this point in the history
  • Loading branch information
hrynko committed Aug 19, 2020
1 parent 8c490dd commit 14768bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('SelectCountryComponent', () => {
country: new SimpleChange(undefined, 'de', true)
});

await fixture.whenStable();
fixture.detectChanges();

expect(inputElement.value).toMatch('Germany');
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class MatSelectCountryComponent implements OnInit, OnChanges, ControlValu
}

onBlur() {
if (this.value || !this.nullable) {
if (this.countryFormControl.value || !this.nullable) {
this.countryFormControl.setValue(
this.value ? this.value.name : ''
);
Expand Down

0 comments on commit 14768bc

Please sign in to comment.