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

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -