react-js-pagination icon indicating copy to clipboard operation
react-js-pagination copied to clipboard

Cannot set both active and inactive classes

Open J4C0814N opened this issue 4 years ago • 0 comments

It doesn't look like it is possible to set both the inactive and active link classes.

For example, trying to set the active link to green with all other links red:

          <Pagination
            activePage={1}
            itemsCountPerPage={1}
            totalItemsCount={10}
            pageRangeDisplayed={5}
            onChange={(e) => selectPage(e)}
            itemClass="page-item"
            linkClass="page-link bg-danger"
            activeLinkClass="bg-success"
          />

Sets all to red, including the active. Looks like linkClass also gets applied to the active link and overrides:

<li class="page-item active"><a class="page-link bg-danger bg-success" href="#" aria-label="Go to page number 1">1</a></li>

J4C0814N avatar Sep 22 '20 23:09 J4C0814N