meteor-autocomplete icon indicating copy to clipboard operation
meteor-autocomplete copied to clipboard

Reactive values not supported for things other than `settings`

Open Ethaan opened this issue 10 years ago • 5 comments

Is something im missing?

{{> inputAutocomplete settings = settingsMentionsSearchInput id="searchMentions" class="pull-right" placeholder="Search" value="@{{this}}"}}

this return @{{this}} as plain text on the autocomplete.

Ethaan avatar Sep 25 '15 04:09 Ethaan

Have you just tried ... value=this}} ?

mizzao avatar Sep 25 '15 14:09 mizzao

yes :s, still the same

Ethaan avatar Sep 25 '15 14:09 Ethaan

Maybe it doesn't support reactive values then; I'm not sure. What happens with value="blah"?

mizzao avatar Sep 25 '15 14:09 mizzao

value="e"

works great, so yeah i think reactive values are not supported

Thanks for the response =D

Ethaan avatar Sep 25 '15 14:09 Ethaan

I defined my reactivevars like this:

Template.Calculator.onCreated(function CalculatorOnCreated() {
    // counter starts at 0
    this.parent1 = new ReactiveVar({"name": ""});
    this.parent2 = new ReactiveVar({"name": ""});
    this.results = new ReactiveVar("collapse");
});

then assigned them in events 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);
    },

Nolapete avatar Jun 25 '16 04:06 Nolapete