Skip to content

Commit ce5fa64

Browse files
vnbaaijdvoituron
andauthored
Fix #4340 (#4491)
Co-authored-by: Denis Voituron <dvoituron@outlook.com>
1 parent 566f96b commit ce5fa64

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

examples/Demo/Shared/Pages/DataGrid/Examples/DataGridMultiSelect.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ else
5353
</FluentDataGrid>
5454

5555
<div>
56-
<b>Peoples:</b>
56+
<b>People:</b>
5757
@String.Join("; ", People.Where(p => p.Selected).Select(p => p.Name))
5858
</div>
5959
}

src/Core/Components/DataGrid/Columns/SelectColumn.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public DataGridSelectMode SelectMode
183183
/// Null is undefined.
184184
/// </summary>
185185
[Parameter]
186-
public bool? SelectAll { get; set; } = false;
186+
public bool? SelectAll { get; set; }
187187

188188
/// <summary>
189189
/// Gets or sets the action to be executed when the [All] checkbox is clicked.
@@ -521,10 +521,9 @@ private void RefreshHeaderContent()
521521
/// <summary />
522522
private bool? GetSelectAll()
523523
{
524-
// Using SelectedItems only
525524
if (InternalGridContext != null && (Grid.Items != null || Grid.ItemsProvider != null))
526525
{
527-
if (_selectedItems.Count == 0)
526+
if (_selectedItems.Count == 0 && !InternalGridContext.Items.Any(Property))
528527
{
529528
return false;
530529
}

0 commit comments

Comments
 (0)