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

Support multiple collections for multiple input fields, with each collection maps to an input field? #128

Open liut2 opened 8 years ago

liut2 commented 8 years ago

So, I have been reading through the issues list in case I asked something duplicated. And there is one issue mentioning using multiple collections in a single input field. But my question is different in that, I'm having three input fields, each of which querys on a different collection. But the problem is that only the query result for the first one can be rendered properly; for the rest two, there is a tiny drop down list without rendering the results properly. And I don't know why. Thanks for answering. Below is the screenshot:

image image

As you can see, the first autocomplete works well, but the second doesn't.

And this is basically my page structure: each template contains an autocomplete input field. image

Nolapete commented 8 years ago

I got around a similar issue by adding the autocomplete id like this

"autocompleteselect input#parent1": function(e, t, doc) {
        Template.instance().parent1.set(doc);
    },
"autocompleteselect input#parent2": function(e, t, doc) {
        Template.instance().parent2.set(doc);
    },