corejavascript / corejavascript/typeahead.js
Bloodhound.js - No sub-completions of strings
- Dominant language
- JavaScript
- Stars
- 968
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
Sub-completions as in, If I write "og", I get "dog", right now, I implemented the standalone .js engine into my code, and I can search for "d", and it will give me "dog, dinner" but If I search for "og", I don't get "dog", which is different from their demos, I'm doing this currently...
```
Acts.prototype.InitializeBloodhound = function (myparam)
{
var options = myparam.split(",");
myengine = new Bloodhound({
initialize: false,
local: options,
queryTokenizer: Bloodhound.tokenizers.whitespace,
datumTokenizer: Bloodhound.tokenizers.whitespace
});
var vret = myengine.initialize(true);
vret.fail(function() { assert("Bloodhound failed."); });
};
// ... other actions here ...
Acts.prototype.BloodhoundAutocomplete = function (myparam)
{
myengine.search(myparam, bloodhound_sync, bloodhound_async);
}
function bloodhound_sync(datums) {
lastreturn = datums;
}
function bloodhound_async(datums) {
lastreturn = datums;
}
```
I then log lastreturn which gives me, dog, doggy for do, but nothing for og, Thank you for your help
Contributor guide
Assessment
This issue has not been assessed yet.