Skip to content

Latest commit

 

History

History
245 lines (154 loc) · 9.76 KB

CHANGELOG.md

File metadata and controls

245 lines (154 loc) · 9.76 KB

>= 9.0.0 (WIP)

  • Removed support for depecrated extraAriaContext (please use ariaLabelBuilder instead)

>= 8.2.0

  • Add an ARIA label for pagination break link with default props of Jump forward and Jump backward when index is before and after the break, respectively
  • Add an optional prop to PaginationBoxView breakAriaLabels allowing the above labels to be user defined.

>= 8.1.5

  • Fix the type of renderOnZeroPageCount in the type declaration file (#454).
  • Explain how to add CSS style to the component (#472).

>= 8.1.4

>= 8.1.3

  • Support React 18 (see: #423)

>= 8.1.2

  • Excluded unnecessary files from package (see: #410)

>= 8.1.1

  • Add TypeScript definition for pageLabelBuilder prop

>= 8.1.0

  • A new prop onClick has been added. It is a callback for any click on the component. It exposes information on the part clicked (for eg. isNext for when next control is clicked or isBreak for a break clicked), the next expected page nextSelectedPage & others. Can return false to prevent any page change or a number to override the page to jump to. Just return nothing (or undefined) to let default behavior take place. (see: #263)
  • Prevent breaks to be displayed when both pageRangeDisplayed and marginPagesDisplayed are 0

>= 8.0.3

  • Fix bug on marginPagesDisplayed={0} (see: #396)

>= 8.0.2

>= 8.0.1

  • Fix the indexed passed when replacing a break (containing only one page) with the actual page (see: #395)

>= 8.0.0

  • 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, selectedPageRel and nextPageRel. To disable the rel attribute, set them to null. (see: #391)
  • A new prop disabledLinkClassName has been added. It allows to add a custom class on disabled previous and next controls. Default to undefined (no class added).
  • tabindex is now set to -1 on disabled controls (disable previous/next buttons; active page button). (see: #219)
  • Add a warning when providing an initialPage prop value that is greater than the maximum page index from pageCount prop.
  • Add a warning when providing a forcePage prop value that is greater than the maximum page index from pageCount prop.
  • The href generated from hrefBuilder prop is now also set on active page control <a> tag. (see #242)
  • A new prop hrefAllControls has been added. It allows to enable hrefBuilder for 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)

>= 7.1.5

  • Fix the Webpack build to work for both browser and Node (see: #389)
  • Add a warning when providing both initialPage and forcePage props. You should only provides forcePage when the component is controlled. (see: #290)

>= 7.1.4

  • A new prop renderOnZeroPageCount has been added. It allows to define what to display when pageCount is zero. By default, it lets the main pagination boxes be displayed (Previous / Next). To display nothing, just provides renderOnZeroPageCount={null}. (see: #377)
  • A new prop className has been added, which is an alias to containerClassName and is useful for integration with CSS-in-JS frameworks like styled-components. (see: #321)
  • Fix the Webpack build by providing a web target (see: #317)
  • Add a warning when a non integer is provided for pageCount

>= 7.1.3

  • Remove react-hot-loader from production build.

>= 7.1.2

  • A new prop pageLabelBuilder has been added. It allows to customize pages labels of the component. By default, the page number is displayed (see: #334).

>= 7.1.1

  • Add an onPageActive callback (see: #349).

>= 7.1.0

  • Compatibility with React v17.0

>= 7.0.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.

>= 6.5.0

  • Add a prop 'eventListener' to let users use a custom event listener on prev/next buttons, pages and break views.

>= 6.4.0

  • 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).

>= 6.3.2

  • Bump dependency 'mixin-deep' from 1.3.1 to 1.3.2 (see: #283).

>= 6.3.1

  • Handle 'forcePage' value if set from outside (see: #272).

>= 6.3.0

  • Add the ariaLabelBuilder feature to customize aria-label attributes (see: #260).

>= 6.2.1

  • Fix the breakLabel prop type in the BreakView component (see: #257).

>= 6.2.0

  • Add the breakLinkClassName prop.

>= 6.1.0

  • Add aria-disabled prop to anchors for accessibility (#254)
  • Setup eslint and prettier for dev

>= 6.0.0

  • 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>.

>= 5.3.1

  • Tests improvements + fix package release (#245).

>= 5.3.0

  • Add the activeLinkClassName property.

>= 5.2.5

  • Upgrade webpack dev dependencies (Fix "Cannot read property 'properties' of undefined" from webpack-cli).

>= 5.2.4

  • Use ES6 export in react_components/index.js (#203).

>= 5.2.3

  • Add a role="button" on <a> tags to let screen readers know explicitly that links (without href) are intended to be interactive elements (#212).

>= 5.2.2

  • Remove the useless node_modules folder from the previous release (#208).

>= 5.2.1

  • Fix disabledClassName not used in previous and next classnames (#204).

>= 5.2.0

  • Delete the dependency on react-addons-create-fragment.
  • Delete the dependency on classnames.

>= 5.1.0

  • Refactor using destructuring.
  • Upgrade react-hot-loader to version 3.0.0 (dev dependency).

>= 5.0.0

  • Compatibility with React v16.0

>= 4.3.0

  • The HTML attribute aria-label has been added.
  • A new prop extraAriaContext allows to add some extra text to the end of the aria-label to provide additional context to the users.

>= 4.2.0

  • A new prop hrefBuilder has been added. It allows to add custom href attributes on <a> tags of the component.
  • Packages react and react-addons-create-fragment are now dependencies (see package.json).

>= 4.0.0

  • Some variable have been renamed:

    • clickCallback -> onPageChange
    • initialSelected -> initialPage
    • forceSelected -> forcePage
    • pageNum -> pageCount
  • onClick events have been moved on <a> tags (previously on <li>s).

>= 3.0.0

clickCallback (onPageChange) isn't called during initialization anymore.

>= 1.0.0

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>

<= 0.5.7

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>