twitter / typeahead.js

typeahead.js is a fast and fully-featured autocomplete library
http://twitter.github.io/typeahead.js/
MIT License
16.52k stars 3.21k forks source link

typeahead.js showing all results instead of just matching results #1766

Open Rageshcnc opened 5 years ago

Rageshcnc commented 5 years ago

var bestquestions = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: './dist/js/questions.json', remote: { url: './dist/js/questions.json', wildcard: '%QUERY' } });

$('#custom-templates .typeahead').typeahead({ minLength: 3, hint: true, highlight: true
}, {
limit: 10, name: 'questions', display: 'value', source: bestquestions,

});

This configuration is displaying the filtered data with unmatched data. image