Skip to content
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

Multiple Datasets with Bloodhound with different sources #97

Closed
panips opened this issue Nov 14, 2016 · 2 comments
Closed

Multiple Datasets with Bloodhound with different sources #97

panips opened this issue Nov 14, 2016 · 2 comments

Comments

@panips
Copy link

panips commented Nov 14, 2016

I have a question regarding multiple data sets. I want to setup two data sources in my typeahead with different headers. Hence i made two bloodhound objects, one with a local source and another with a remote source. The problem i am facing is that while the local source is searchable, the remote source shows no suggestions. I can see the remote call going through and returning with a dataset from the server but the typeahead doesn't show the result.
The example code is in a gist

@jlbooker
Copy link
Contributor

@panips First, I'd suggest simplifying the problem by removing the local source. Try to get just the remote source working on its own first.

Which version of the project are you using? This sounds possibly related to an outstanding bug in the upstream twitter project (see twitter/typeahead.js#1212). Please try cloning the latest version of this project, or use NPM to install it with npm install corejs-typeahead@beta, then try again with just the remote source.

@panips
Copy link
Author

panips commented Nov 15, 2016

Thanks a lot for helping me out and pointing me in the right direction :)... I was not sending the async function parameter in the search function i.e. instead of allNames.search(q, sync); , I should have used allNames.search(q, sync, async);
The typeahead is now working perfectly.

@panips panips closed this as completed Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants