Skip to content

Fix for remote/async suggestions - #1359

Open
kricklen wants to merge 1 commit into
twitter:masterfrom
kricklen:patch-1
Open

kricklen wants to merge 1 commit into
twitter:masterfrom
kricklen:patch-1

Conversation

@kricklen

Copy link
Copy Markdown

This is probably the same issue as in #1284 but have a look.
There seems to be a problem when rendering the suggestions of a remote request.
To reproduce, set the typeahead limit=2 and have 2 items returned from the remote source => no suggestions will be rendered.
In this case the following values are set: rendered=0, limit=2, suggestions.length=2, which results in 0 sliced items.
Damn nasty thing to notice, since it only occurs when limit=suggestions.length (and because slice accepts negative numbers) :)

There seems to be a problem when rendering the suggestions of a remote request.
To reproduce, set the typeahead limit=2 and have 2 items returned from the remote source => no suggestions will be rendered.
In this case the following values are set: rendered=0, limit=2, suggestions.length=2, which results in 0 sliced items.
Damn nasty thing to notice, since it only occurs when limit=suggestions.length (and because slice accepts negative numbers) :)
monoblaine added a commit to monoblaine/typeahead.js that referenced this pull request Aug 26, 2015
@core-system-dev

Copy link
Copy Markdown

@kricklen 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

@jlbooker

jlbooker commented Oct 5, 2015

Copy link
Copy Markdown
Contributor

Looks like a duplicate of #1212, has been fixed over at corejavascript/typeahead.js#8

monoblaine added a commit to monoblaine/typeahead.js that referenced this pull request Jun 7, 2016
@CLAassistant

CLAassistant commented Jul 18, 2019 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants