Open
Description
- I have searched the Issues to see if this bug has already been reported
- I have tested the latest version
Steps to reproduce
- Render pagination component with this props:
<Pagination
currentPage={1}
totalPages={1}
showIcons
nextLabel=""
previousLabel=""
/>
Current behavior
There is no 1
between the arrows, just two buttons (previous and next)
Expected behavior
1
is shown between the arrows, similarly to the case when we have 2 and more pages.
Context
I would like to show the Pagination
component with only one page when user has a small amount of data.
The problem is in range
function, where this check is contained
if (start >= end) {
return [];
}
I would assume it should be
if (start > end) {
return [];
}
but not sure whether this breaks the expected behaviour from your side. If you are fine I can create the PR.
Thanks,
Sergii