Skip to content

Commit

Permalink
Merge branch 'master' into issue-15778
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rajat19 authored Dec 11, 2024
2 parents 5481d03 + 46c46ff commit 92de0c8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useGridApiContext } from '../../utils/useGridApiContext';
import { useGridRootProps } from '../../utils/useGridRootProps';
import { gridExpandedRowCountSelector } from '../filter';
import { gridRowCountSelector, gridRowsLoadingSelector } from '../rows';
import { gridPinnedRowsCountSelector } from '../rows/gridRowsSelector';
import { GridLoadingOverlayVariant } from '../../../components/GridLoadingOverlay';
import { GridOverlayWrapper } from '../../../components/base/GridOverlays';
import type { GridOverlayType } from '../../../components/base/GridOverlays';
Expand All @@ -18,7 +19,8 @@ export const useGridOverlays = () => {

const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
const visibleRowCount = useGridSelector(apiRef, gridExpandedRowCountSelector);
const noRows = totalRowCount === 0;
const pinnedRowsCount = useGridSelector(apiRef, gridPinnedRowsCountSelector);
const noRows = totalRowCount === 0 && pinnedRowsCount === 0;
const loading = useGridSelector(apiRef, gridRowsLoadingSelector);

const showNoRowsOverlay = !loading && noRows;
Expand Down

0 comments on commit 92de0c8

Please sign in to comment.