-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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 #1314 - limit doesn't work properly with more than one digit #1319
base: master
Are you sure you want to change the base?
Conversation
the suggestions where sliced with: rendered += suggestions.length; suggestions.slice(0, that.limit - rendered) which is fine as long as limit < suggestions.length because slicing with a negative index works but if limit = suggestions.length then no element is rendered. if limit > suggestions.length then the results are truncated.
I just ran into the same issue. If limit == suggestions it shows no results. |
This sets an arbitrary large limit (50) on the "pois" dataset to work around twitter/typeahead.js#1319.
This sets an arbitrary large limit (50) on the "pois" dataset to work around twitter/typeahead.js#1319.
This reverts commit 7ca21c0.
This reverts commit 7ca21c0.
@PierreAnctil Could you please re-submit this PR to github:corejavascript/typeahead.js. This project pretty much has been abandoned, and we continue now on a new fork. For more information please see #1320 |
Looks like a duplicate of #1212, has been fixed over at corejavascript/typeahead.js#8 |
* fix suggestion length bug see: twitter#1319
|
the suggestions where sliced with:
rendered += suggestions.length;
suggestions.slice(0, that.limit - rendered)
which is fine as long as limit < suggestions.length because slicing with a negative index works
but if limit = suggestions.length then no element is rendered.
if limit > suggestions.length then the results are truncated.