Skip to content

Commit

Permalink
MultiSelect : Prefer DisplayData over viewData (#3456)
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Moreira authored Feb 16, 2022
1 parent bc43496 commit e03b2a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/Extensions/Blazorise.DataGrid/DataGrid.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ protected internal async Task OnMultiSelectAll( bool selectAll )

if ( RowSelectable is not null )
{
foreach ( var item in viewData )
foreach ( var item in DisplayData )
{
if ( RowSelectable.Invoke( new( item, DataGridSelectReason.MultiSelectAll ) ) )
{
Expand All @@ -856,7 +856,7 @@ protected internal async Task OnMultiSelectAll( bool selectAll )
}
else
{
SelectedRows.AddRange( viewData );
SelectedRows.AddRange( DisplayData );
}
}
else
Expand Down Expand Up @@ -1447,9 +1447,9 @@ private bool IsMultiSelectAllIndeterminate

if ( hasSelectedRows )
{
var unselectedRows = viewData.Except( SelectedRows ).Count();
var unselectedRows = DisplayData.Except( SelectedRows ).Count();

return MultiSelect && hasSelectedRows && unselectedRows > 0 && unselectedRows < viewData.Count();
return MultiSelect && hasSelectedRows && unselectedRows > 0 && unselectedRows < DisplayData.Count();
}

return false;
Expand Down

0 comments on commit e03b2a1

Please sign in to comment.