Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] : Server side search NoEntriesfoundlabel not working fine always. #239

Closed
Arjun-1r opened this issue Jun 28, 2020 · 1 comment · Fixed by #241
Closed

[BUG] : Server side search NoEntriesfoundlabel not working fine always. #239

Arjun-1r opened this issue Jun 28, 2020 · 1 comment · Fixed by #241
Labels
bug Something isn't working

Comments

@Arjun-1r
Copy link

Describe the bug
When we search the dropdown unknown value it is expected to show No search results found for the search as per NoEntriesfoundlabel. But it is not working 100%.

To Reproduce
See it in action at https://stackblitz.com/github/bithost-gmbh/ngx-mat-select-search-example

  1. Go to the example
  2. On server-side search dropdown type in 'dddddd' some unknown input.

Expected behavior
No results found the label should be displayed.

Screenshots
Screenshot not needed. In the example itself, we can see.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome

Additional context
Please solve this bug.

@Arjun-1r Arjun-1r added the bug Something isn't working label Jun 28, 2020
@macjohnny
Copy link
Member

@Arjun-1r thanks for reporting.
I guess this is due to

if (this.matOption) {
if (this._noEntriesFound()) {
this.matOption._getHostElement().classList.add('mat-select-search-no-entries-found');
} else {
this.matOption._getHostElement().classList.remove('mat-select-search-no-entries-found');
}
}

not being invoked, since no options change when initially typing a keyword that leads to no results
this._options.changes
.pipe(
takeUntil(this._onDestroy)
)
.subscribe((optionChanges: QueryList<MatOption>) => {

macjohnny added a commit that referenced this issue Jul 10, 2020
macjohnny added a commit that referenced this issue Jul 10, 2020
…lable initially (#241)

* fix: correctly show no entries found message when no options are available initially

fixes #239

* fixup! fix: correctly show no entries found message when no options are available initially

* fixup! fix: correctly show no entries found message when no options are available initially
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants