corejavascript / corejavascript/typeahead.js
Document ttAdapter and integration between typeahead and bloodhound
- Dominant language
- JavaScript
- Stars
- 968
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
Cross-posting this from https://github.com/twitter/typeahead.js
The docs are split in two with no page explaining how the two fit together, which is how they will be used most of the time.
More importantly, there's no mention whatsoever in either page of the `ttAdapter` method, even though most users specify `engine.ttAdapter()` as their source in the typeahead, as is done [here](http://stackoverflow.com/a/21533204/4200039). This is a key function as it runs the engine's search:
```
__ttAdapter: function ttAdapter() {
var that = this;
return this.remote ? withAsync : withoutAsync;
function withAsync(query, sync, async) {
return that.search(query, sync, async);
}
function withoutAsync(query, sync) {
return that.search(query, sync);
}
},
```
Contributor guide
Assessment
This issue has not been assessed yet.