-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Fix(typeahead): show available choices onFocus when minLength == 0 #1919
Fix(typeahead): show available choices onFocus when minLength == 0 #1919
Conversation
Codecov Report
@@ Coverage Diff @@
## development #1919 +/- ##
===============================================
+ Coverage 85.93% 86.08% +0.14%
===============================================
Files 78 78
Lines 2098 2098
Branches 273 273
===============================================
+ Hits 1803 1806 +3
+ Misses 202 200 -2
+ Partials 93 92 -1
Continue to review full report at Codecov.
|
Guys , this issue is fixed or what?? |
Hello,
(angular 4.0.3 & ngx-bootstrap 1.6.6) EDIT : contrary to what @dasdecoder pretends below, it works (confirmed by @tzielins). It makes |
@renaudaste I tried |
@dasdecoder the [] trick works but you can also force the value to be 0 by declaring a numerical variable in your component with 0 value and reference it from the template, for example [typeaheadMinLength]="zero" |
Guys, it is not a trick. It works as expected Thanks for PR |
@valorkin , @tzielins , @renaudaste unfortunately none of the above mentioned solutions worked for me. I added @HostListener('click') listener in TypeaheadDirective.ts and it started responding the way i need . I am not sure that it's the correct way of solving the issue. Please correct me if am doing wrong... |
Workaround for the issue valor-software#1919 (typeahead): show available choices onFocus when minLength == 0
Workaround for the issue #1919 (typeahead): show available choices onFocus when minLength == 0
Fixes #1559
Currently typeahead does not show list on focus when typeaheadMinLength="0" even is such behaviour is documented.
onFocus method is comparing minLength with 0, while the angular sets input property to string '0' and no event is emitted.
Fixed the issue by replacing === with == in the comparison.