Closed
Description
Below is the code to init typeahead
var moviesTypeahead = $('#moviesTypeahead').typeahead({
name: 'movies',
remote:'movies.json',
template: template,
engine: Handlebars
});
this is my movies.json datasource
[
{
"adult": false,
"backdrop_path": "mBLimfLfAcAhKTSf6d2lU8fNNuJ.jpg",
"id": 13387,
"name": "@Transporter3",
"value": "Transporter 3",
"release_date": "2008-12-05",
"poster_path": "/eEQ4JieKyLBRRSRnRGuPlxp7qiS.jpg",
"popularity": 2.4774809734915,
"title": "Transporter 3",
"vote_average": 7.6,
"vote_count": 20
},
{
"adult": false,
"backdrop_path": null,
"id": 94261,
"name": "@TheAmazingTransplant",
"value": "The Amazing Transplant",
"release_date": "1970-01-01",
"poster_path": "/xJ8mOfMyvg6aVLRSpdSO1sL3Lcj.jpg",
"popularity": 0.2,
"title": "The Amazing Transplant",
"vote_average": 0,
"vote_count": 0
}
]
Now suppose i start typing out "ama" it doesn't filter out the other result item namely "@TRANSPORTER3". But if i change datasource type to prefetch instead of remote filtering works. Just wondering why its not filtering out results in case of remote.
Below are screenshots for same.
Prefetch
Remote
Metadata
Metadata
Assignees
Labels
No labels