HeroicEric / ember-group-by

An Ember addon that adds a computed property macro for grouping objects by a given property.
MIT License
53 stars 17 forks source link

Nested Model Values #14

Open bmx269 opened 7 years ago

bmx269 commented 7 years ago

I am using the group-by to show referenced items, but I am unable to load data from the related model. The item loads the data if there is only 1 item in the array, but when there are more, I am unable to show that data.

{{#each (take 5 (sort-by "items.length:desc" votesByItem)) as |group index|}}
   {{#each (take 1 group.items) as |vote|}}
      <div class="item item-{{index}}">
         <div class="image" style="{{vote.fieldItemRef.fieldImage.itemBackground}}">  
         </div>
         <div class="title">
            <span>{{vote.fieldItemRef.title}}</span>
        </div>
     </div>   
  {{/each}}
{{/each}}