Skip to content

Commit e83b4b8

Browse files
authored
Update MudListExtended.razor.cs (#282)
1 parent 0dc307e commit e83b4b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CodeBeam.MudBlazor.Extensions/Components/ListExtended/MudListExtended.razor.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,13 +1156,14 @@ protected void SelectAllItems(bool? deselect = false)
11561156
_allSelected = true;
11571157
}
11581158

1159+
var selectedItems = items.Where(x => x.IsSelected).Select(y => y.Value).ToHashSet(_comparer);
11591160
if (ItemCollection != null)
11601161
{
1161-
SelectedValues = deselect == true ? Enumerable.Empty<T>() : ItemCollection.ToHashSet(_comparer);
1162+
SelectedValues = deselect == true ? Enumerable.Empty<T>() : selectedItems;
11621163
}
11631164
else
11641165
{
1165-
SelectedValues = items.Where(x => x.IsSelected).Select(y => y.Value).ToHashSet(_comparer);
1166+
SelectedValues = selectedItems;
11661167
}
11671168

11681169
if (MudSelectExtended != null)

0 commit comments

Comments
 (0)