diff --git a/packages/material-react-table/src/components/toolbar/MRT_ToolbarAlertBanner.tsx b/packages/material-react-table/src/components/toolbar/MRT_ToolbarAlertBanner.tsx index 76f5e5917..47f918bdf 100644 --- a/packages/material-react-table/src/components/toolbar/MRT_ToolbarAlertBanner.tsx +++ b/packages/material-react-table/src/components/toolbar/MRT_ToolbarAlertBanner.tsx @@ -24,7 +24,7 @@ export const MRT_ToolbarAlertBanner = ({ }: MRT_ToolbarAlertBannerProps) => { const { getFilteredSelectedRowModel, - getPrePaginationRowModel, + getCoreRowModel, getState, options: { enableRowSelection, @@ -52,7 +52,7 @@ export const MRT_ToolbarAlertBanner = ({ table, }); - const totalRowCount = rowCount ?? getPrePaginationRowModel().flatRows.length; + const totalRowCount = rowCount ?? getCoreRowModel().rows.length; const selectedRowCount = useMemo( () =>