27 lines
836 B
Handlebars
27 lines
836 B
Handlebars
<SortableGroupAccessible
|
|
@models={{this.sortedItems}}
|
|
as |groupHasFocus selectedIndex orderItemDown orderItemUp handleBlur|>
|
|
<SortableGroup
|
|
@onChange={{action this.reorderMeals}}
|
|
as |group|>
|
|
{{#each this.sortedItems as |meal index|}}
|
|
<SortableItemAccessible
|
|
@groupHasFocus={{groupHasFocus}}
|
|
@currentIndex={{index}}
|
|
@selectedIndex={{selectedIndex}}
|
|
@orderItemDown={{orderItemDown}}
|
|
@orderItemUp={{orderItemUp}}
|
|
@handleBlur={{handleBlur}}>
|
|
<SortableItem
|
|
@model={{meal}}
|
|
@group={{group}}
|
|
data-test-id="meal-item">
|
|
<MealItem
|
|
@meal={{meal}}
|
|
@handleBlur={{handleBlur}}
|
|
/>
|
|
</SortableItem>
|
|
</SortableItemAccessible>
|
|
{{/each}}
|
|
</SortableGroup>
|
|
</SortableGroupAccessible>
|