fix(pagination): Show page number when there is only 1 page
When there is only 1 page the page number is not shown, instead only the disabled buttons () are shown. The correct behavior is to show the active page number (1) and have the buttons disabled.
This is fixed by modifying the range functions implementation to return an array with a single number when start and end are equal, instead of an empty array. The change to range function doesn't break any other functionality.
fix #1048
Current:
Fixed:
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| flowbite-react | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 27, 2024 5:19am |
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
7461173) 99.54% compared to head (9937616) 97.38%. Report is 192 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #1240 +/- ##
==========================================
- Coverage 99.54% 97.38% -2.17%
==========================================
Files 163 216 +53
Lines 6621 9217 +2596
Branches 401 538 +137
==========================================
+ Hits 6591 8976 +2385
- Misses 30 241 +211
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.