File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/Core/Components/DataGrid/Columns Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ // ------------------------------------------------------------------------
2
+ // MIT License - Copyright (c) Microsoft Corporation. All rights reserved.
3
+ // ------------------------------------------------------------------------
4
+
1
5
using Microsoft . AspNetCore . Components ;
2
6
using Microsoft . AspNetCore . Components . Rendering ;
3
7
using Microsoft . AspNetCore . Components . Web ;
@@ -528,7 +532,10 @@ internal async Task OnClickAllAsync(MouseEventArgs e)
528
532
_selectedItems . Clear ( ) ;
529
533
if ( SelectAll == true )
530
534
{
531
- _selectedItems . AddRange ( InternalGridContext . Grid . Items ? . ToArray ( ) ?? InternalGridContext . Items ) ;
535
+ // Only add selectable items
536
+ _selectedItems . AddRange ( ( InternalGridContext . Grid . Items ? . ToList ( ) ?? InternalGridContext . Items )
537
+ . Where ( item => Selectable ? . Invoke ( item ) ?? true )
538
+ ) ;
532
539
}
533
540
534
541
if ( SelectedItemsChanged . HasDelegate )
You can’t perform that action at this time.
0 commit comments