react-component / react-component/pagination

Number of Pages are showing wrong in case of dynamic pagesize

Open
#567 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
674
Forks
333
Avg merge
12m
Merged PRs (30d)
1

Description

image

here my questionsPerPageArray is [5, 5, 4, 5 , 5 , 5, 3]

what's happening when I'm on 1st page it is showing me 7 page total , but when I goes to 3rd page it is showing me 8 pages total , like 8*4 = 32

so that's why 8 pages, likewise when I go to last page, it is showing me 11 pages total , 3*11 = 33

but I don't want that , I want to make dynamic number of question and number of pages should be consistent

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue in the pagination component with questionsPerPageArray set to [5, 5, 4, 5, 5, 5, 3], then trace how the total page count changes as the current page changes. Done means the displayed total page count remains consistent while navigating pages with dynamic page sizes.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.