From 6979596e2d685bfa6171cdbe14a31e4b868aff94 Mon Sep 17 00:00:00 2001 From: Valentin Fournier Date: Wed, 26 Jun 2024 15:42:06 -0400 Subject: [PATCH 1/3] Add new 'paginationWithControls' prop --- package/DataTable.tsx | 2 ++ package/DataTablePagination.tsx | 2 ++ package/types/DataTablePaginationProps.ts | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package/DataTable.tsx b/package/DataTable.tsx index 3e0c753df..d45adbaa0 100644 --- a/package/DataTable.tsx +++ b/package/DataTable.tsx @@ -63,6 +63,7 @@ export function DataTable({ recordsPerPageOptions, recordsPerPageLabel = 'Records per page', paginationWithEdges, + paginationWithControls, paginationActiveTextColor, paginationActiveBackgroundColor, paginationSize = 'sm', @@ -459,6 +460,7 @@ export function DataTable({ recordsPerPageOptions={recordsPerPageOptions} recordsPerPageLabel={recordsPerPageLabel} paginationWithEdges={paginationWithEdges} + paginationWithControls={paginationWithControls} paginationActiveTextColor={paginationActiveTextColor} paginationActiveBackgroundColor={paginationActiveBackgroundColor} paginationSize={paginationSize} diff --git a/package/DataTablePagination.tsx b/package/DataTablePagination.tsx index a4d518a22..2ef01453c 100644 --- a/package/DataTablePagination.tsx +++ b/package/DataTablePagination.tsx @@ -30,6 +30,7 @@ export const DataTablePagination = forwardRef(function DataTablePagination( page, onPageChange, paginationWithEdges, + paginationWithControls, paginationActiveTextColor, paginationActiveBackgroundColor, paginationSize, @@ -104,6 +105,7 @@ export const DataTablePagination = forwardRef(function DataTablePagination( : undefined } withEdges={paginationWithEdges} + withControls={paginationWithControls} value={page} onChange={onPageChange} size={paginationSize} diff --git a/package/types/DataTablePaginationProps.ts b/package/types/DataTablePaginationProps.ts index c1eeba72a..c92aa5c01 100644 --- a/package/types/DataTablePaginationProps.ts +++ b/package/types/DataTablePaginationProps.ts @@ -4,6 +4,7 @@ import type { DataTablePageSizeSelectorProps } from './DataTablePageSizeSelector export type DataTablePaginationProps = ( | { paginationWithEdges?: never; + paginationWithControls?: never; page?: never; onPageChange?: never; totalRecords?: never; @@ -18,10 +19,15 @@ export type DataTablePaginationProps = ( } | { /** - * Whenther to show first and last page navigation buttons. + * Whether to show first and last page navigation buttons. */ paginationWithEdges?: boolean; + /** + * Whether to show next and previous page navigation buttons. + */ + paginationWithControls?: boolean; + /** * Current page number (1-based). * If provided, a pagination component is shown. From 3fa70ccb68b671fb23134f26c5e7e1d31cbb58c3 Mon Sep 17 00:00:00 2001 From: Ionut-Cristian Florescu Date: Sun, 30 Jun 2024 17:51:03 +0300 Subject: [PATCH 2/3] Update changelog & release new version --- CHANGELOG.md | 5 +++++ app/contribute-and-support/page.tsx | 6 +++--- package.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d036cb58..cc15cd37d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ The following is a list of notable changes to the Mantine DataTable component. Minor versions that are not listed in the changelog are bug fixes and small improvements. +## 7.11.1 (2024-06-30) + +- Add new `paginationWithControls` prop (thanks to [@ValentinJS](https://github.com/ValentinJS) for PR [#611](https://github.com/icflorescu/mantine-datatable/pull/611)) +- Minor docs website improvements + ## 7.11.0 (2024-06-30) - Attempt to fix issue [#596](https://github.com/icflorescu/mantine-datatable/issues/596) again, thanks to [@gfazioli](https://github.com/gfazioli) for PR [#608](https://github.com/icflorescu/mantine-datatable/pull/608) diff --git a/app/contribute-and-support/page.tsx b/app/contribute-and-support/page.tsx index 587a59664..ca4c3960d 100644 --- a/app/contribute-and-support/page.tsx +++ b/app/contribute-and-support/page.tsx @@ -37,8 +37,8 @@ export default function ContributeAndSupportPage() {
  • I think Mantine is currently the best React UI Framework; however people were{' '} - asking in the - community for a ContextMenu component; + asking in the + community for a data-table / data-grid component;
  • I’m a keen advocate of open-source and{' '} @@ -49,7 +49,7 @@ export default function ContributeAndSupportPage() { - I built these projects out of passion, but the constant effort of spending so many hours on open-source + I’m building these projects out of passion, but the constant effort of spending so many hours on open-source development and maintenance takes its toll, and passion alone doesn’t pay the bills. So, if you find{' '} {PRODUCT_NAME} useful and you want to support its future development, please consider{' '} sponsoring my work ❤️. diff --git a/package.json b/package.json index 83acdca40..de87d54e2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mantine-datatable", - "version": "7.11.0", + "version": "7.11.1", "description": "The lightweight, dependency-free, dark-theme aware table component for your Mantine UI data-rich applications, featuring asynchronous data loading support, pagination, intuitive Gmail-style additive batch rows selection, column sorting, custom cell data rendering, row expansion, nesting, context menus, and much more", "keywords": [ "mantine", From ce95fb023af0b6db412f435b10f4027a6c5e6b96 Mon Sep 17 00:00:00 2001 From: Ionut-Cristian Florescu Date: Sun, 30 Jun 2024 17:53:14 +0300 Subject: [PATCH 3/3] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 38177e83b..1d5f7126f 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ Mantine DataTable works perfectly with [Mantine Context Menu](https://icflorescu ## Contributing -See the [contributing guide in the documentation website](https://icflorescu.github.io/mantine-datatable/contribute-and-support) or the repo [CONTRIBUTING.md](https://github.com/icflorescu/mantine-datatable/blob/master/CONTRIBUTING.md) file for details. +See the [contributing guide in the documentation website](https://icflorescu.github.io/mantine-datatable/contribute-and-support) or the repo [CONTRIBUTING.md](https://github.com/icflorescu/mantine-datatable/blob/master/CONTRIBUTING.md) file for details. **Most importantly, remember to make your PRs against the `next` branch.** Here's the list of people who have already contributed to Mantine DataTable: