Skip to content

Commit 4e33c23

Browse files
react-pattern-ui upgrade and navigationComponents (neolution-ch#81)
This PR aims to upgrade pattern-ui and add a property that allows the consumer to customize paging navigation components.
1 parent 350e9ff commit 4e33c23

5 files changed

Lines changed: 21 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Updated `react-pattern-ui` from 3.4.0 to 5.3.0
13+
14+
### Added
15+
16+
- `pagingNavigationComponents` property to customize the paging navigation components
17+
1018
## [5.12.0] - 2025-09-15
1119

1220
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@dnd-kit/core": "^6.1.0",
5050
"@dnd-kit/modifiers": "^7.0.0",
5151
"@dnd-kit/sortable": "^8.0.0",
52-
"@neolution-ch/react-pattern-ui": "^3.4.0",
52+
"@neolution-ch/react-pattern-ui": "^5.3.0",
5353
"@tanstack/react-table": "^8.12.0",
5454
"react-loading-skeleton": "^3.3.1"
5555
},

src/lib/ReactDataTable/ReactDataTable.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const ReactDataTable = <TData, TFilter extends FilterModel = Record<string, neve
4747
enableRowClick,
4848
isStriped = true,
4949
showClearSearchButton = true,
50+
pagingNavigationComponents,
5051
subRowComponent,
5152
} = props;
5253

@@ -338,6 +339,7 @@ const ReactDataTable = <TData, TFilter extends FilterModel = Record<string, neve
338339
}}
339340
pagingPossible={true}
340341
changePageSizePossible={!hidePageSizeChange}
342+
navigationComponents={pagingNavigationComponents}
341343
/>
342344
)}
343345
</>

src/lib/ReactDataTable/ReactDataTableProps.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { CSSProperties } from "react";
33
import { FilterModel } from "../types/TableState";
44
import { DragAndDropOptions } from "./DragAndDropOptions";
5+
import { PagingNavigationComponents } from "@neolution-ch/react-pattern-ui";
56

67
/**
78
* The props for the ReactDataTable component
@@ -118,4 +119,9 @@ export interface ReactDataTableProps<TData, TFilter extends FilterModel> {
118119
* A component to render as a sub-row for a specific row, this will be rendered additionally to the subrows.
119120
*/
120121
subRowComponent?: (row: Row<TData>) => React.ReactNode;
122+
123+
/**
124+
* Custom navigation components for the paging controls
125+
*/
126+
pagingNavigationComponents?: PagingNavigationComponents;
121127
}

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1778,10 +1778,10 @@
17781778
call-me-maybe "^1.0.1"
17791779
glob-to-regexp "^0.3.0"
17801780

1781-
"@neolution-ch/react-pattern-ui@^3.4.0":
1782-
version "3.4.0"
1783-
resolved "https://registry.yarnpkg.com/@neolution-ch/react-pattern-ui/-/react-pattern-ui-3.4.0.tgz#5bde72a20b189ebe6e67e88d43ee597f23acdea7"
1784-
integrity sha512-HLfXCIPJjslo6gsBJ5lBeX2BuUIF/dzITuW5+QvYg5RAANaHsSl4+5p2wDtr61xvVQUptc6Ybrp+DeIKAnWDlA==
1781+
"@neolution-ch/react-pattern-ui@^5.3.0":
1782+
version "5.3.0"
1783+
resolved "https://registry.yarnpkg.com/@neolution-ch/react-pattern-ui/-/react-pattern-ui-5.3.0.tgz#c900bdfc6947cfbe108910425b4dcb4027cdf34f"
1784+
integrity sha512-JO00BhUZNFOxSfzmcH32WoDf+ZgUwx8u83p9VhmMnTwC3dxtE9kOuILqRmRf/+x6HrZWRyNHFgNa0bY2ddPO8Q==
17851785
dependencies:
17861786
classnames "^2.3.2"
17871787

0 commit comments

Comments
 (0)