From 6d20f8fb3cbc844a1ccafd13e076528527014068 Mon Sep 17 00:00:00 2001 From: souto-power Date: Mon, 1 Dec 2025 16:47:49 +0900 Subject: [PATCH 1/3] fix: Change the default value of selectedPageRel to null --- react_components/PaginationBoxView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react_components/PaginationBoxView.js b/react_components/PaginationBoxView.js index 6130a1d..dc8ba21 100755 --- a/react_components/PaginationBoxView.js +++ b/react_components/PaginationBoxView.js @@ -75,7 +75,7 @@ export default class PaginationBoxView extends Component { pageLabelBuilder: (page) => page, eventListener: 'onClick', renderOnZeroPageCount: undefined, - selectedPageRel: 'canonical', + selectedPageRel: null, hrefAllControls: false, }; From 2a02725cee74ab9056b84300e1160fb0ffa81e40 Mon Sep 17 00:00:00 2001 From: souto-power Date: Mon, 1 Dec 2025 16:50:51 +0900 Subject: [PATCH 2/3] test: rel to be null --- __tests__/PaginationBoxView-test.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/__tests__/PaginationBoxView-test.js b/__tests__/PaginationBoxView-test.js index 16003a7..bdf03eb 100755 --- a/__tests__/PaginationBoxView-test.js +++ b/__tests__/PaginationBoxView-test.js @@ -2101,7 +2101,7 @@ describe('Test custom props', () => { ReactDOM.findDOMNode(pagination) .querySelector('li:nth-child(3) a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('li:nth-child(2) a') @@ -2196,17 +2196,17 @@ describe('Test custom props', () => { ReactDOM.findDOMNode(pagination) .querySelector('li:nth-Child(2) a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('.selected a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('li:nth-last-Child(2) a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('li:last-child a') @@ -2227,7 +2227,7 @@ describe('Test custom props', () => { ReactDOM.findDOMNode(pagination) .querySelector('li:nth-Child(2) a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('li:nth-Child(3) a') @@ -2253,7 +2253,7 @@ describe('Test custom props', () => { ReactDOM.findDOMNode(pagination) .querySelector('li:nth-last-Child(2) a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('li:nth-last-Child(3) a') @@ -2284,7 +2284,7 @@ describe('Test custom props', () => { ReactDOM.findDOMNode(pagination) .querySelector('li:nth-Child(3) a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('li:nth-Child(4)') @@ -2316,7 +2316,7 @@ describe('Test custom props', () => { ReactDOM.findDOMNode(pagination) .querySelector('li:nth-last-Child(3) a') .getAttribute('rel') - ).toBe('canonical'); + ).toBe(null); expect( ReactDOM.findDOMNode(pagination) .querySelector('li:nth-last-Child(4)') From 76c406f77f64b7589d3f1dbada2e33a61bf5057c Mon Sep 17 00:00:00 2001 From: souto-power Date: Mon, 1 Dec 2025 17:01:50 +0900 Subject: [PATCH 3/3] docs: readme and comment out --- README.md | 2 +- index.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6203d73..e74b0f8 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ Finally there is this **[CodePen demo](https://codepen.io/monsieurv/pen/yLoMxYQ) | `prevRel` | `String` | The `rel` property on the `a` tag for the prev page control. Default value `prev`. Set to `null` to disable. | | `nextRel` | `String` | The `rel` propery on the `a` tag for the next page control. Default value `next`. Set to `null` to disable. | | `prevPageRel` | `String` | The `rel` property on the `a` tag just before the selected page. Default value `prev`. Set to `null` to disable. | -| `selectedPageRel` | `String` | The `rel` propery on the `a` tag for the selected page. Default value `canonical`. Set to `null` to disable. | +| `aselectedPageRel` | `String` | The `rel` propery on the `a` tag for the selected page. Default value `null`. Set to `null` to disable. | | `nextPageRel` | `String` | The `rel` property on the `a` tag just after the selected page. Default value `next`. Set to `null` to disable. | ## Demo diff --git a/index.d.ts b/index.d.ts index 71becef..96a13a1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -238,7 +238,7 @@ export interface ReactPaginateProps { /** * The `rel` propery on the `a` tag for the selected page. - * Default value `canonical`. Set to `null` to disable. + * Default value `null`. Set to `null` to disable. */ selectedPageRel?: string | null | undefined; }