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

HTML 'value' attribute cannot be dynamic #69

Closed Scalahansolo closed 9 years ago

Scalahansolo commented 9 years ago

Currently when you have an input in meteor you can have the value of the form be something dynamic under the current data context. I.e.

<input ... value={{this.value}} ...>

When using your auto-complete in the same manner...

{{> inputAutocomplete settings=costCodeAutoComplete id="create-get-cost-code" class="form-control" name="cost-code" value={{this.value}} placeholder="Cost Code..."}}

You get the following error.

client/html/create_report.html:88: Expected identifier, number, string, boolean, or null
...me="cost-code" value={{this.value}} place...

Is there any way to get this fixed?

Scalahansolo commented 9 years ago

This was just me making a silly error. It should be used like the following.

{{> inputAutocomplete settings=costCodeAutoComplete id="create-get-cost-code" class="form-control" name="cost-code" value=this.value placeholder="Cost Code..."}}