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

[autocomplete] dropdown should present user with "No results" text #514

Open
rafiqdeen opened this issue Apr 1, 2024 · 2 comments
Open
Labels

Comments

@rafiqdeen
Copy link

Describe the bug:
When searching a term that provide No Results in the dropdown then clicking at the end of the term is providing default dropdown results which looks like the dropdown showing incorrect result for the searched term.

To Reproduce:
Steps to reproduce the behavior:

  1. Go to https://forge.tylerdev.io/main/?path=/docs/components-autocomplete--default
  2. Click on "Choose State" Input field and Enter "xyz"
  3. Again click inside the Input field.
  4. Then seeing default search results in the dropdown.

Expected behavior:
If the term doesn't have any results, show a warning "No Results found" or Preserve the empty dropdown even after clicking the input field second time if the search term have no results.

Screenshots:
Screenshot from 2024-04-01 12-45-32

Please complete the following information:

  • Forge version: [e.g. v2.0.0]
  • I have searched existing issues before creating this report? [Y/N]
  • Browser: [e.g. Chrome, Firefox, Safari, All]
  • Platform: [e.g. desktop, mobile, All]
  • OS: [e.g. Windows, Mac, Linux, iOS, Android, All]
@rafiqdeen rafiqdeen added the bug Something isn't working label Apr 1, 2024
@DRiFTy17
Copy link
Collaborator

DRiFTy17 commented Apr 1, 2024

@rafiqdeen Yeah I think this is a bug... Thanks for reporting it! The autocomplete shouldn't attempt to execute the filter when clicking on the field if it is already focused. We'll get this taken care of so that it doesn't call the filter callback in this scenario.

Additionally, at this point the autocomplete is not responsible for what appears in the dropdown as far as showing "No results found". We will leave this up to developers for now, but I do think it would be worth us considering adding this as an configuration option to make it easier in the future. Would you be able to add this idea to our Canny board here? This will allow others to vote on the feature request and provide discussion.

@rafiqdeen
Copy link
Author

rafiqdeen commented Apr 2, 2024

Thank you @DRiFTy17 . Added this feature request in Canny board : https://tylerforge.canny.io/feature-requests/p/prevent-auto-complete-dropdown-providing-incorrect-results

@DRiFTy17 DRiFTy17 changed the title [components-autocomplete--default] Auto Complete dropdown result providing incorrect results when "No Results" case [autocomplete] dropdown should present user with "No results" text Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants