Skip to content

Commit

Permalink
fix: total row count for selection went up when grouping (#1342)
Browse files Browse the repository at this point in the history
Beforehand the total row count went up when grouping.

This is fixed by using the core row modal as none transformation has happend. From my understanding this will always give the amount of possible rows to select as this is the max amount of rows given to the table.

Fixes: #1227
  • Loading branch information
fredericbahr authored Dec 22, 2024
1 parent b4a14f7 commit 39cd8bc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const MRT_ToolbarAlertBanner = <TData extends MRT_RowData>({
}: MRT_ToolbarAlertBannerProps<TData>) => {
const {
getFilteredSelectedRowModel,
getPrePaginationRowModel,
getCoreRowModel,
getState,
options: {
enableRowSelection,
Expand Down Expand Up @@ -52,7 +52,7 @@ export const MRT_ToolbarAlertBanner = <TData extends MRT_RowData>({
table,
});

const totalRowCount = rowCount ?? getPrePaginationRowModel().flatRows.length;
const totalRowCount = rowCount ?? getCoreRowModel().rows.length;

const selectedRowCount = useMemo(
() =>
Expand Down

0 comments on commit 39cd8bc

Please sign in to comment.