- Removed support for depecrated
extraAriaContext(please useariaLabelBuilderinstead)
- Add React 19 to peer dependencies.
- Add an ARIA label for pagination break link with default props of
Jump forwardandJump backwardwhen index is before and after the break, respectively - Add an optional prop to PaginationBoxView
breakAriaLabelsallowing the above labels to be user defined.
- Fix the type of
renderOnZeroPageCountin the type declaration file (#454). - Explain how to add CSS style to the component (#472).
- Add an ARIA role
navigationto main<ul>tag - Dependencies bumps for generating build. Replace
react-hot-loaderbyreact-refresh(see: #428 (comment))
- Support React 18 (see: #423)
- Excluded unnecessary files from package (see: #410)
- Add TypeScript definition for
pageLabelBuilderprop
- A new prop
onClickhas been added. It is a callback for any click on the component. It exposes information on the part clicked (for eg.isNextfor when next control is clicked orisBreakfor a break clicked), the next expected pagenextSelectedPage& others. Can returnfalseto prevent any page change or a number to override the page to jump to. Just return nothing (orundefined) to let default behavior take place. (see: #263) - Prevent breaks to be displayed when both
pageRangeDisplayedandmarginPagesDisplayedare 0
- Fix bug on
marginPagesDisplayed={0}(see: #396)
- Add TypeScript definitions directly in the repository (instead of community definitions from DefinitelyTyped) (see: #394)
- Fix the indexed passed when replacing a break (containing only one page) with the actual page (see: #395)
- Remove button role for links with an href (see: #390)
- Add a rel attribute on previous page, current page and next page controls. They are respectivement customizable thanks to props
prevPageRel,selectedPageRelandnextPageRel. To disable the rel attribute, set them tonull. (see: #391) - A new prop
disabledLinkClassNamehas been added. It allows to add a custom class on disabledpreviousandnextcontrols. Default toundefined(no class added). tabindexis now set to-1on disabled controls (disable previous/next buttons; active page button). (see: #219)- Add a warning when providing an
initialPageprop value that is greater than the maximum page index frompageCountprop. - Add a warning when providing a
forcePageprop value that is greater than the maximum page index frompageCountprop. - The
hrefgenerated fromhrefBuilderprop is now also set on active page control<a>tag. (see #242) - A new prop
hrefAllControlshas been added. It allows to enablehrefBuilderfor all controls. - Fix page range of 2 when first page is selected. (see #307)
- Fix the breaking algorithm to not create breaks for only one page (see: #270)
- Fix the Webpack build to work for both browser and Node (see: #389)
- Add a warning when providing both
initialPageandforcePageprops. You should only providesforcePagewhen the component is controlled. (see: #290)
- A new prop
renderOnZeroPageCounthas been added. It allows to define what to display whenpageCountis zero. By default, it lets the main pagination boxes be displayed (Previous / Next). To display nothing, just providesrenderOnZeroPageCount={null}. (see: #377) - A new prop
classNamehas been added, which is an alias tocontainerClassNameand is useful for integration with CSS-in-JS frameworks like styled-components. (see: #321) - Fix the Webpack build by providing a
webtarget (see: #317) - Add a warning when a non integer is provided for
pageCount
- Remove react-hot-loader from production build.
- A new prop
pageLabelBuilderhas been added. It allows to customize pages labels of the component. By default, the page number is displayed (see: #334).
- Add an onPageActive callback (see: #349).
- Compatibility with React v17.0
- Add a rel attribute on previous/next buttons. Rel attributes are customizable thanks to props 'prevRel' and 'nextRel' (see: #326).
- Upgrade devDependencies packages jest-cli and webpack-cli.
- Add a prop 'eventListener' to let users use a custom event listener on prev/next buttons, pages and break views.
- Two properties have been added to extend accessibility support (see #164).
- nextAriaLabel: defines the aria-label html property for the 'Next page' button (default: 'Next page').
- previousAriaLabel: defines the aria-label html property for the 'Previous page' button (default: 'Previous page').
- Upgrade devDependencies packages (see: #314).
- Bump dependency 'mixin-deep' from 1.3.1 to 1.3.2 (see: #283).
- Handle 'forcePage' value if set from outside (see: #272).
- Add the ariaLabelBuilder feature to customize aria-label attributes (see: #260).
- Fix the breakLabel prop type in the BreakView component (see: #257).
- Add the breakLinkClassName prop.
- Add aria-disabled prop to anchors for accessibility (#254)
- Setup eslint and prettier for dev
- Implement forward/backward jump when clicking on a breakview (ellipsis).
- The 'breakLabel' prop should not receive an
<a>tag anymore. Otherwise, a warning will appear in the JS console:validateDOMNesting(...): <a> cannot appear as a descendant of <a>.
- Tests improvements + fix package release (#245).
- Add the activeLinkClassName property.
- Upgrade webpack dev dependencies (Fix "Cannot read property 'properties' of undefined" from webpack-cli).
- Use ES6 export in react_components/index.js (#203).
- Add a role="button" on
<a>tags to let screen readers know explicitly that links (without href) are intended to be interactive elements (#212).
- Remove the useless node_modules folder from the previous release (#208).
- Fix
disabledClassNamenot used in previous and next classnames (#204).
- Delete the dependency on
react-addons-create-fragment. - Delete the dependency on
classnames.
- Refactor using destructuring.
- Upgrade react-hot-loader to version 3.0.0 (dev dependency).
- Compatibility with React v16.0
- The HTML attribute
aria-labelhas been added. - A new prop
extraAriaContextallows to add some extra text to the end of thearia-labelto provide additional context to the users.
- A new prop
hrefBuilderhas been added. It allows to add customhrefattributes on<a>tags of the component. - Packages
reactandreact-addons-create-fragmentare now dependencies (see package.json).
-
Some variable have been renamed:
clickCallback->onPageChangeinitialSelected->initialPageforceSelected->forcePagepageNum->pageCount
-
onClickevents have been moved on<a>tags (previously on<li>s).
clickCallback (onPageChange) isn't called during initialization anymore.
HTML Structure:
<ul class="pagination">
<li class="disabled">
<a href="#"><span>«</span></a>
</li>
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
<li>
<a href="#"><span>»</span></a>
</li>
</ul>HTML Structure:
<ul>
<li class="disabled">
<a href="#"><span>«</span></a>
</li>
<li>
<ul>
<li class="active"><a href="#">1</a></li>
<li><a href="#">2</a></li>
<li><a href="#">3</a></li>
<li><a href="#">4</a></li>
<li><a href="#">5</a></li>
</ul>
</li>
<li>
<a href="#"><span>»</span></a>
</li>
</ul>