Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property 'value' of undefined #100

Open
achtan opened this issue Aug 19, 2015 · 2 comments
Open

Cannot read property 'value' of undefined #100

achtan opened this issue Aug 19, 2015 · 2 comments

Comments

@achtan
Copy link

achtan commented Aug 19, 2015

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?

@mvgalle
Copy link

mvgalle commented May 7, 2016

You'll want to make sure to update "data-selected" to "data-select"

janat08 pushed a commit to janat08/meteor-typeahead that referenced this issue Apr 12, 2018
Remove non-essential files from npm package
@kevinwu
Copy link

kevinwu commented May 28, 2018

did you solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants