title: Multiple datasets not working with Twitter Typeahead/Bloodhound when remote data source is used
body: <p>The Twitter Typeahead <a href="https://twitter.github.io/typeahead.js/examples/" rel="nofollow">examples page</a> show how to use multiple datasets with Typeahead. Here is working example code using the <code>local</code> data source option:</p>
  
  <pre><code>var nbaTeams = new Bloodhound({
      datumTokenizer: Bloodhound.tokenizers.obj.whitespace('team'),
      queryTokenizer: Bloodhound.tokenizers.whitespace,
      local: []
  });
  
  var nhlTeams = new Bloodhound({
      datumTokenizer: Bloodhound.tokenizers.obj.whitespace('team'),
      queryTokenizer: Bloodhound.tokenizers.whitespace,
      local: []
  });
  
  nbaTeams.initialize();
  nhlTeams.initialize();
  
  $('#multiple-datasets .typeahead').typeahead({
          highlight: true
      },
      {
          name: 'nba-teams',
          displayKey: 'team',
          source: nbaTeams.ttAdapter(),
          templates: {
              empty: [
                  '&lt;div class="tt-empty-message"&gt;',
                  'No Results',
                  '&lt;/div&gt;'
              ].join('\n'),
              header: '&lt;h3 class="tt-tag-heading tt-tag-heading2"&gt;1&lt;/h3&gt;'
          }
      },
      {
          name: 'nhl-teams',
          displayKey: 'team',
          source: nhlTeams.ttAdapter(),
          templates: {
              empty: [
                  '&lt;div class="tt-empty-message"&gt;',
                  'No Results',
                  '&lt;/div&gt;'
              ].join('\n'),
              header: '&lt;h3 class="tt-tag-heading tt-tag-heading2"&gt;2&lt;/h3&gt;'
          }
      });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/YNXm5/" rel="nofollow">JSFIDDLE</a></p>
  
  <p>If you try out the above JSFIDDLE by typing in the input on the page, you'll see that the two datasets are shown in the typeahead dropdown. </p>
  
  <p>The problem I'm facing is that if I change the data source to <code>remote</code>, only the second dataset is shown in the dropdown. I've simplified my <code>remote</code> code (which actually sends the query using POST instead of get) and you can see it here:</p>
  
  <p><a href="http://jsfiddle.net/GSH4f/2/" rel="nofollow">JSFIDDLE</a></p>
  
  <p>If you try <em>this</em> JSFIDDLE, you'll see that only the second dataset is shown in the typeahead dropdown. if you view the network traffic when typing in the input, you'll see that only one AJAX request is made, when it should be two (one for each dataset).</p>
  
  <p>When I view the network traffic on my website (with my real code), it also shows that a request is only made for the second dataset. So, for some reason, Typeahead/Bloodhound is only making a request for the second dataset instead of one for each dataset. It also only displays results (or lack thereof) for the second dataset, instead of for each dataset.</p>
  
  <p>Why don't multiple datasets work when using the <code>remote</code> data source option?</p>