Repository navigation
fix #1314 - limit doesn't work properly with more than one digit - #1319
Open
PierreAnctil wants to merge 1 commit into
Open
PierreAnctil wants to merge 1 commit into
PierreAnctil wants to merge 1 commit into
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. |
Open
elemoine
added a commit
to Geoportail-Luxembourg/geoportailv3
that referenced
this pull request
Aug 18, 2015
This sets an arbitrary large limit (50) on the "pois" dataset to work around twitter/typeahead.js#1319.
elemoine
added a commit
to Geoportail-Luxembourg/geoportailv3
that referenced
this pull request
Aug 18, 2015
This sets an arbitrary large limit (50) on the "pois" dataset to work around twitter/typeahead.js#1319.
elemoine
added a commit
to Geoportail-Luxembourg/geoportailv3
that referenced
this pull request
Sep 2, 2015
This reverts commit 7ca21c0.
elemoine
added a commit
to Geoportail-Luxembourg/geoportailv3
that referenced
this pull request
Sep 3, 2015
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 |
Contributor
|
Looks like a duplicate of #1212, has been fixed over at corejavascript/typeahead.js#8 |
scips
added a commit
to RTBF/typeahead.js
that referenced
this pull request
Jan 6, 2017
scips
added a commit
to RTBF/typeahead.js
that referenced
this pull request
Jan 6, 2017
* fix suggestion length bug see: twitter#1319
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.