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

[add]: autoFocus option added in autocompleted widget #95

Closed
wants to merge 1 commit into from

Conversation

muskangupta-iitr
Copy link

Description

When user types anything in the sidebar filters input boxes, user have to select one of the dropdown results in order to search for it. It doesn't work when user press the enter key.

Fixes #49

Solution

We can fix this issue by just enabling one of the options autoFocus:true as per the autocomplete documentation. As the user types anything in the input box, according to search results it will automatically selects the first option and when user press the enter it will be selected.

@Nikhil-Vats
Copy link
Member

This doesn't work as expected. Please read this comment. Your PR prevents the user from writing free text and instead autocompletes the suggestion from the list of available filters, sometimes even with 3 letters, ex - I just wrote dat and it autocompleted to Antigen processing: Ubiquitination & Proteasome degradation, similarly just writing sig changes to Signal Transduction. Feel free to ask any doubts that you may have. 😃

@AdrianBZG Please correct me if I'm wrong. 😄

@AdrianBZG
Copy link
Member

Hi @Nikhil-Vats , @muskangupta-iitr ,

Yes you are correct, the autocompletion should only be triggered when the user press the "enter" key, which should do two things:

  1. Autocomplete with the most likely term and
  2. Apply the filter

@muskangupta-iitr
Copy link
Author

@AdrianBZG @Nikhil-Vats I will try to implement that and update the PR!
Thanks 👍

@AdrianBZG AdrianBZG closed this in b5f6996 Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow free text (write and press the enter key) and display something if there are not results
4 participants