meteor-typeahead
meteor-typeahead copied to clipboard
Cannot read property 'value' of undefined
hi, i am getting this error, but i cannot find where is occurred
> args >> undefined undefined undefined
index.js:121 TypeError: Cannot read property 'value' of undefined
at http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:218:67
at String.reverseArgs (http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:94:28)
at Function.jQuery.extend.each (http://localhost:3000/packages/jquery.js?dd8bac56f8fd3666d433d2285ae01e52597cc51a:417:23)
at Object._.each (http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:92:19)
at SearchIndex.tokenize [as datumTokenizer] (http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:217:23)
at http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:478:51
at reverseArgs (http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:94:28)
at Function.jQuery.extend.each (http://localhost:3000/packages/jquery.js?dd8bac56f8fd3666d433d2285ae01e52597cc51a:417:23)
at Object._.each (http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:92:19)
at SearchIndex.window.SearchIndex._.mixin.add (http://localhost:3000/packages/sergeyt_typeahead.js?0ed9586690ee3bfbc3b6c6983d55ddc2dcaf0b40:475:19)
searchFilter.es6:14
Uncaught TypeError: async is not a function
html
<input class="typeahead search" name="search" type="text"
placeholder="Marketing Assistant, HR Advisor, Software Engineer..."
autocomplete="off" spellcheck="off"
data-source="suggestions"
data-selected="selected"
data-min-length=0
data-limit="100"
data-template="suggestion" />
Template helper
suggestions(query, sync, async) {
console.log('> args >>', query, sync, async);
setTimeout(function() {
var data = SuggestionsSearch.getData();
async(data);
}, 30);
},
as you can see console.log('> args >>', query, sync, async);
is logged befor the error Cannot read property 'value' of undefined
but all args are undefined
any suggestion on this?
You'll want to make sure to update "data-selected" to "data-select"
did you solve the problem?