Skip to content

Commit

Permalink
#4, #10: fix showing no options available message
Browse files Browse the repository at this point in the history
  • Loading branch information
macjohnny committed Mar 19, 2018
1 parent 0e53216 commit 1594863
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

Thanks to @joqkey

* Bugfix: show "no options found" message as soon as no options are found [#4](https://github.com/bithost-gmbh/ngx-mat-select-search/issues/4), [#10](https://github.com/bithost-gmbh/ngx-mat-select-search/issues/10)

## 1.0.0

Expand Down
7 changes: 7 additions & 0 deletions src/app/mat-select-search/mat-select-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,13 @@ export class MatSelectSearchComponent implements OnInit, OnDestroy, AfterViewIni

ngAfterViewInit() {
this.setOverlayClass();

// update view when available options change
this.matSelect.options.changes
.pipe(takeUntil(this._onDestroy))
.subscribe(() => {
this.changeDetectorRef.markForCheck();
});
}

/**
Expand Down

0 comments on commit 1594863

Please sign in to comment.