Skip to content

Commit

Permalink
release v2.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVandy committed Jan 5, 2024
1 parent 64dd481 commit 545bf47
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 33 deletions.
6 changes: 6 additions & 0 deletions apps/material-react-table-docs/pages/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import Head from 'next/head';

### Version 2

#### Version 2.4.1 - 2024-01-05

- Fixed MUI Pagination disabled tooltip warning
- Fixed Column Pinning Spacing with Column Virtualization
- Fixed Column Action Clear Filter Item when filterFn was "empty" or "notEmpty"

#### Version 2.4.0 - 2024-01-04

- Upgraded to TanStack Table `v8.11.3` for bug fixes with expanding and row selection
Expand Down
2 changes: 1 addition & 1 deletion packages/material-react-table/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "2.4.0",
"version": "2.4.1",
"license": "MIT",
"name": "material-react-table",
"description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
Expand Down
75 changes: 43 additions & 32 deletions packages/material-react-table/src/toolbar/MRT_TablePagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
..._rest
} = paginationProps ?? {};

const disableBack = pageIndex <= 0 || disabled;
const disableNext = lastRowIndex >= totalRowCount || disabled;

return (
<Box
className="MuiTablePagination-root"
Expand Down Expand Up @@ -166,47 +169,55 @@ export const MRT_TablePagination = <TData extends MRT_RowData>({
} ${totalRowCount.toLocaleString()}`}</Typography>
<Box gap="xs">
{showFirstButton && (
<Tooltip title={localization.goToFirstPage}>
<Tooltip enterDelay={1000} title={localization.goToFirstPage}>
<span>
<IconButton
aria-label={localization.goToFirstPage}
disabled={disableBack}
onClick={() => setPageIndex(0)}
size="small"
>
<FirstPageIcon />
</IconButton>
</span>
</Tooltip>
)}
<Tooltip enterDelay={1000} title={localization.goToPreviousPage}>
<span>
<IconButton
aria-label={localization.goToFirstPage}
disabled={pageIndex <= 0 || disabled}
onClick={() => setPageIndex(0)}
aria-label={localization.goToPreviousPage}
disabled={disableBack}
onClick={() => setPageIndex(pageIndex - 1)}
size="small"
>
<FirstPageIcon />
<ChevronLeftIcon />
</IconButton>
</Tooltip>
)}
<Tooltip title={localization.goToPreviousPage}>
<IconButton
aria-label={localization.goToPreviousPage}
disabled={pageIndex <= 0 || disabled}
onClick={() => setPageIndex(pageIndex - 1)}
size="small"
>
<ChevronLeftIcon />
</IconButton>
</span>
</Tooltip>
<Tooltip title={localization.goToNextPage}>
<IconButton
aria-label={localization.goToNextPage}
disabled={lastRowIndex >= totalRowCount || disabled}
onClick={() => setPageIndex(pageIndex + 1)}
size="small"
>
<ChevronRightIcon />
</IconButton>
</Tooltip>
{showLastButton && (
<Tooltip title={localization.goToLastPage}>
<Tooltip enterDelay={1000} title={localization.goToNextPage}>
<span>
<IconButton
aria-label={localization.goToLastPage}
disabled={lastRowIndex >= totalRowCount || disabled}
onClick={() => setPageIndex(numberOfPages - 1)}
aria-label={localization.goToNextPage}
disabled={disableNext}
onClick={() => setPageIndex(pageIndex + 1)}
size="small"
>
<LastPageIcon />
<ChevronRightIcon />
</IconButton>
</span>
</Tooltip>
{showLastButton && (
<Tooltip enterDelay={1000} title={localization.goToLastPage}>
<span>
<IconButton
aria-label={localization.goToLastPage}
disabled={disableNext}
onClick={() => setPageIndex(numberOfPages - 1)}
size="small"
>
<LastPageIcon />
</IconButton>
</span>
</Tooltip>
)}
</Box>
Expand Down

2 comments on commit 545bf47

@vercel
Copy link

@vercel vercel bot commented on 545bf47 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 545bf47 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.