Skip to content

Commit

Permalink
fix(lib): added the ability to disable the component using reactive f…
Browse files Browse the repository at this point in the history
…orms #45
  • Loading branch information
AnthonyNahas committed Oct 23, 2020
1 parent a4195a3 commit 19ed988
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class MatSelectCountryComponent implements OnInit, OnChanges, OnDestroy,
}

setDisabledState?(isDisabled: boolean): void {
// throw new Error('Method not implemented.');
this.disabled = isDisabled;
}

autocompleteScroll() {
Expand Down
10 changes: 6 additions & 4 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ export class AppComponent implements OnInit {

this.countryFormGroup = this.formBuilder.group({
country: [{
name: 'Deutschland',
alpha2Code: 'DE',
alpha3Code: 'DEU',
numericCode: '276'
value: {
name: 'Deutschland',
alpha2Code: 'DE',
alpha3Code: 'DEU',
numericCode: '276'
}, disabled: false
}]
});

Expand Down

0 comments on commit 19ed988

Please sign in to comment.