react-component / react-component/pagination

How to display more page item?

Open
#269 5 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

There are space to display more page item. Currently, there is only 1, 2, 3, 4, 5 and 282.

<Pagination ref={ref => this.pagination = ref}
                            current={this.state.pageIndex}  
                            pageSize={this.getNumPerPage()}
                            showQuickJumper={{goButton: true}}
                            total={fileLength} 
                            itemRender={(item, type) =>{
                                if(type === "page"){
                                    return  <div>{item}</div>;
                                }else if(type === "prev" || type === "next"){
                                    return <a className="rc-pagination-item-link" />
                                }
                            }}
                            onChange={this.handlePageChange.bind(this)} 
/>);

Is there a prop to do it?
Thank you very much.

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

Reproduce the pagination shown in the issue using the provided JSX and inspect the Pagination API for a prop controlling how many page items are displayed. Check the existing behavior around the current page, ellipses, and the final page number. Done means the component can display more page items than 1–5 while preserving navigation and quick jumping.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, typescript
Domain
frontend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.