Skip to content

Conversation

@scarfacedeb
Copy link
Contributor

@scarfacedeb scarfacedeb commented Sep 15, 2017

I've added _Close function to AutoComplete that is being called in AlphaNum mapping to hide dropdown when user edits existing query.

Steps to reproduce:

  1. Add MinChars: 3 to AutoComplete options.
  2. Enter some query that is longer than 3 chars.
  3. Autocomplete dropdown is rendered with suggestions.
  4. Edit the query to make it 1-2 characters long.
  5. Autocomplete dropdown is still visible.

What should've happened:

Dropdown shouldn't have been visible, because query is less than MinChars characters long.

@scarfacedeb
Copy link
Contributor Author

Any news?

@ghost
Copy link

ghost commented Apr 9, 2018

@baptistedonaux
I need exactly the same behaviour. Would love to see this PR merged.

We probably should also call _close with the enter keyboard event. See Line 212.

@baptistedonaux baptistedonaux changed the base branch from 2.6 to 2.7 June 12, 2018 10:39
@baptistedonaux baptistedonaux modified the milestones: examples, 2.7 Jun 12, 2018
@baptistedonaux baptistedonaux merged commit e4f138f into autocompletejs:2.7 Jun 12, 2018
@baptistedonaux
Copy link
Contributor

Thanks for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants