corejavascript / corejavascript/typeahead.js

Bloodhound.js - No sub-completions of strings

Open
#155 0 comments 0 reactions 0 assignees View on GitHub
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

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.