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/__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)') 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; } 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, };