Skip to content

Commit

Permalink
Select all button (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
Webreaper committed Feb 24, 2021
1 parent 8981112 commit 1bba102
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Damselfly.Web/Shared/Images/ImageGrid.razor
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
<i class="fas fa-shopping-basket" />
&nbsp;Add
</button>

<button @onclick="() => { SelectGroup(grouping); }" class="btn btn-primary">
<i class="fas fa-shopping-basket" />
&nbsp;Select
</button>
</div>
}

Expand Down Expand Up @@ -112,6 +115,11 @@
StatusService.Instance.StatusText = $"{grouping.Images.Count()} images added to the basket";
}

void SelectGroup(ImageGrouping grouping)
{
SelectionService.Instance.SelectImages(grouping.Images);
StatusService.Instance.StatusText = $"{grouping.Images.Count()} images added to the basket";
}

private List<ImageGrouping> GroupedImages
{
Expand Down

0 comments on commit 1bba102

Please sign in to comment.