File tree 1 file changed +3
-1
lines changed
packages/x-data-grid/src/hooks/features/overlays
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { useGridApiContext } from '../../utils/useGridApiContext';
4
4
import { useGridRootProps } from '../../utils/useGridRootProps' ;
5
5
import { gridExpandedRowCountSelector } from '../filter' ;
6
6
import { gridRowCountSelector , gridRowsLoadingSelector } from '../rows' ;
7
+ import { gridPinnedRowsCountSelector } from '../rows/gridRowsSelector' ;
7
8
import { GridLoadingOverlayVariant } from '../../../components/GridLoadingOverlay' ;
8
9
import { GridOverlayWrapper } from '../../../components/base/GridOverlays' ;
9
10
import type { GridOverlayType } from '../../../components/base/GridOverlays' ;
@@ -18,7 +19,8 @@ export const useGridOverlays = () => {
18
19
19
20
const totalRowCount = useGridSelector ( apiRef , gridRowCountSelector ) ;
20
21
const visibleRowCount = useGridSelector ( apiRef , gridExpandedRowCountSelector ) ;
21
- const noRows = totalRowCount === 0 ;
22
+ const pinnedRowsCount = useGridSelector ( apiRef , gridPinnedRowsCountSelector ) ;
23
+ const noRows = totalRowCount === 0 && pinnedRowsCount === 0 ;
22
24
const loading = useGridSelector ( apiRef , gridRowsLoadingSelector ) ;
23
25
24
26
const showNoRowsOverlay = ! loading && noRows ;
You can’t perform that action at this time.
0 commit comments