corejavascript / corejavascript/typeahead.js

Document ttAdapter and integration between typeahead and bloodhound

Open
#17 1 comment 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.