ember.js - How to use ember-power-select in {{#each}} block -
i generating ember-power-select box using {{#each}} block in hbs template shown in code below.
{{#each hps |hp|}} {{#power-select search=(action "searchrepo") selected=selected onchange=(action (mut selected)) |repo| }} {{repo.name}} {{/power-select}} {{/each}}
the above code generates 2 select boxes. when select value in first box,the same value gets replicated in second box too.
what way differentiate 2 select boxes?
this works me
// controller roles: ['project manager', 'tech lead', 'member'], <ul> {{#each user.projectroles |projectrole|}} <li> <label>{{projectrole.project}}</label> {{#power-select selected=projectrole.role options=roles onchange=(action (mut projectrole.role)) |role|}} {{role}} {{/power-select}} </li> {{/each}} </ul>
Comments
Post a Comment