-
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
Multiple datasets not working when remote data sources used (introduced in latest release) #896
Comments
I thought I remembered having this working last week, but didn't mention it because I wasn't sure. However, I just noticed the latest version of typeahead was released only two days ago, so I just tried my code with the previous version (0.10.2) and it works: Here's the fiddle from my StackOverflow question using the latest version (which does not work): So this bug was introduced in the latest version of Typeahead/Bloodhound. |
Err, I think I've identified the issue and it looks like a legit bug 😦 Give me a chance to confirm the bug and I'll post a branch with a fix ASAP. Thanks for reporting this. |
Alright, I've created the pull request #899. Here's a link to the bundle dist file for that pull request. When you get a chance can you see if that fixes your problem? |
Yep, that fixes it! Thanks! |
Great! I'm going to reopen this issue; I'll close it once I have the fix merged into a proper release branch. |
Fixed has been merged into |
I'm using the v0.10.4 bundle file and still seeing the issue described above: two remote data sources and I'm only seeing one ajax request being made. If i switch around the order of the data sources in the typeahead it looks like only the first source works. In the stack overflow post the original problem was that only the second data source was being used, also it mentions that only the second data set was showing results. Instead I'm seeing two sets of results in the typeahead suggestions dropdown but its just the first data set duplicated. |
@danielcmartin I think your issue is unrelated to mine since both of your datasets are displaying. It's likely not actually a bug, but rather due to the way Bloodhound caches requests. Are your endpoints for the data sources the same? If so, Bloodhound will cache the response even if URL parameters or POST data is different. The only way I've found to stop Bloodhound from caching responses is to add the
You can view my full source code here if it helps (although I'm in the middle of an update atm so search isn't working): http://www.pricewombat.com/deals |
Thanks @nhouse you were right. The replace callback fixed my issue. |
Hello, i am using bloodhounds js to bind autocomplete textbox. I am using cascading autocomplete just like select county & retrieve corresponding state. When i select first country i got data in state autocomplete & again i select another country then same data display in state field. bloodhounds data source is not returning update data. it returns old data.I am using local Storage option in bloodhounds js. kindly suggest. Thanks, |
I am having the same issue as described here: #104
I'm not sure whether I should be commenting in there, or creating a new issue, but since that was closed over a year ago I've chosen the latter.
The Typeahead example page shows how to use multiple datasets with Typeahead/Bloodhound. It works great when a local or prefetch data source is used, but it does not work with a remote data source.
I posted my problem on StackOverflow before stumbling across the above issue: http://stackoverflow.com/questions/24727145/multiple-datasets-not-working-with-twitter-typeahead-bloodhound-when-remote-data
I am using the latest version of Typeahead and Bloodhound from here: http://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.min.js
The text was updated successfully, but these errors were encountered: