Open leizard opened 8 years ago
Hi, thank you for awesome package. How could I use parameter in the data-source helper function. Some thing like this:
<input class="form-control typeahead" name="team" type="text" placeholder="NBA teams" autocomplete="off" spellcheck="off" data-source="(customerCodes code)" data-select="selected" data-render="rendered"/>
and the helper:
Template.myTemplate.helpers({ customerCodes: function(code) { return Customers.find({code: code}).fetch().map(function(it){ return {id: it._id, value: it.code}; }); } })
Thank you.
Hi @leizard, I think you could just return all customer codes and typeahead input does the rest, since it is autocomplete input :)
Hi, thank you for awesome package. How could I use parameter in the data-source helper function. Some thing like this:
and the helper:
Thank you.