oferh / ng2-completer

Angular 2 autocomplete component
http://oferh.github.io/ng2-completer/
MIT License
347 stars 172 forks source link

isOpen is getting true from the first charecter itself when we set min minSearchLength #292

Open mukuljp opened 7 years ago

mukuljp commented 7 years ago

isOpen is getting true from the first charecter itself when we set min minSearchLength to 2 or more. this flag is setting to true even when the dropdown list is hidden.

oferh commented 7 years ago

This is caused because the trigger for open is any that a key was pressed, the check for minSearchLength is done at a later stage. Open state is being checked to perform search so it's not trivial to fix this bug.