Skip to content

data-source parameter #154

@leizard

Description

@leizard

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions