Skip to content

Nested Model Values #14

@bmx269

Description

@bmx269

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}}

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