File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 55 GridPaginationModel ,
66 GridColDef ,
77 GridRowId ,
8- GridRenderCellParams
8+ GridRenderCellParams ,
9+ GridRowSelectionModel
910} from '@mui/x-data-grid'
1011import {
1112 Tooltip ,
@@ -635,6 +636,9 @@ const BookingList = ({
635636 paginationModel = { paginationModel }
636637 onPaginationModelChange = { setPaginationModel }
637638 onRowSelectionModelChange = { ( _selectedIds ) => {
639+ if ( _selectedIds . type === 'exclude' && _selectedIds . ids . size === 0 ) {
640+ _selectedIds = { type : 'include' , ids : new Set ( rows . map ( ( row ) => row . _id as GridRowId ) ) }
641+ }
638642 setSelectedIds ( Array . from ( new Set ( _selectedIds . ids ) ) . map ( ( id ) => id . toString ( ) ) )
639643 } }
640644 disableRowSelectionOnClick
Original file line number Diff line number Diff line change 44 DataGrid ,
55 GridColDef ,
66 GridRenderCellParams ,
7+ GridRowId ,
78} from '@mui/x-data-grid'
89import {
910 Tooltip ,
@@ -371,6 +372,9 @@ const UserList = ({
371372 paginationModel = { paginationModel }
372373 onPaginationModelChange = { setPaginationModel }
373374 onRowSelectionModelChange = { ( _selectedIds ) => {
375+ if ( _selectedIds . type === 'exclude' && _selectedIds . ids . size === 0 ) {
376+ _selectedIds = { type : 'include' , ids : new Set ( rows . map ( ( row ) => row . _id as GridRowId ) ) }
377+ }
374378 setSelectedIds ( Array . from ( new Set ( _selectedIds . ids ) ) . map ( ( id ) => id . toString ( ) ) )
375379 setReloadColumns ( true )
376380 } }
You can’t perform that action at this time.
0 commit comments