Meteor-Community-Packages / meteor-autocomplete

Client/server autocompletion designed for Meteor's collections and reactivity.
https://atmospherejs.com/mizzao/autocomplete
MIT License
350 stars 109 forks source link

Meteor Autocomplete Type Error #117

Open evanglerm opened 8 years ago

evanglerm commented 8 years ago

Hi I am using aldeed:autoform,mizzao:autocomplete and mpowaga:autoform-autocomplete.

I am also using Ionic due to which I am @Autoform:4.2.2 version.

I get following error when I try to use Autocomplete.

TypeError: Cannot read property 'limit' of undefined
    at new AutoComplete (mizzao_autocomplete.js:171)
    at autocompleteHelpers.autocompleteContainer [as _render] (mizzao_autocomplete.js:570)
    at doRender (view.js:351)

Can u tell me what is the issue here. Everything else in schema etc are very straight forward exactly as your example

Registers2.attachSchema(new SimpleSchema({
  /* ... */
  title: {
    type: String,
    autoform: {
      afFieldInput: {
        type: 'autocomplete-input',
        placeholder: 'Title',
        settings : { position: "top",
                    limit: 5,
                    rules: [
                      {
                        token: '',
                        collection: Registers,
                        field: "config.name",
                        template: Meteor.isClient &&  Template.contactlisting
                      }]}}}},
  content: {
    type: String,
    autoform: {
      afFieldInput: {
        type: 'autocomplete-textarea',
        rows: 4
      }   }  }}));
mizzao commented 8 years ago

I've never used mpowaga:autoform-autocomplete so I can't help, although I would like this to support autoform at some point (#9, #91). Just haven't found the time to do that yet.