Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ else
</FluentDataGrid>

<div>
<b>Peoples:</b>
<b>People:</b>
@String.Join("; ", People.Where(p => p.Selected).Select(p => p.Name))
</div>
}
Expand Down
5 changes: 2 additions & 3 deletions src/Core/Components/DataGrid/Columns/SelectColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public DataGridSelectMode SelectMode
/// Null is undefined.
/// </summary>
[Parameter]
public bool? SelectAll { get; set; } = false;
public bool? SelectAll { get; set; }

/// <summary>
/// Gets or sets the action to be executed when the [All] checkbox is clicked.
Expand Down Expand Up @@ -521,10 +521,9 @@ private void RefreshHeaderContent()
/// <summary />
private bool? GetSelectAll()
{
// Using SelectedItems only
if (InternalGridContext != null && (Grid.Items != null || Grid.ItemsProvider != null))
{
if (_selectedItems.Count == 0)
if (_selectedItems.Count == 0 && !InternalGridContext.Items.Any(Property))
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The call to InternalGridContext.Items.Any(Property) iterates through all items in the grid each time GetSelectAll() is invoked. For large datasets, this could impact performance. Consider caching this result or using an alternative approach if RefreshHeaderContent() is called frequently. However, since RefreshHeaderContent() is only called when selection state changes, this may be acceptable for most use cases.

Copilot uses AI. Check for mistakes.
{
return false;
}
Expand Down
Loading