corejavascript / corejavascript/typeahead.js

Suggestion only when first letter match query

Open
#79 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

This is same issue as in https://github.com/twitter/typeahead.js/issues/1363
here also not fixed :(

```
var suggest_autodiscovery__ip_nets = new Bloodhound({
queryTokenizer: Bloodhound.tokenizers.whitespace,
datumTokenizer: Bloodhound.tokenizers.whitespace,
local: ['127.0.0.0/8','192.168.0.0/16','10.0.0.0/8','172.16.0.0/12']
});
$('#autodiscovery__ip_nets').typeahead({
hint: false,
highlight: true,
minLength: 1
},
{ name: "suggest",
limit: 16,
source: suggest_autodiscovery__ip_nets
});
```

if I type '1', '12', '19' - results found,
but if I type '8', '0', etc - nothing

when I change to

```
datumTokenizer: Bloodhound.tokenizers.nonword,
queryTokenizer: Bloodhound.tokenizers.nonword
```

search is better, but anyway strange behavior:
'8' and '0' - now found,
but '6' or '68' - still NOT FOUND.

`matchAnyQueryToken: true` - also does not 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.