react-component / react-component/pagination

onChange doesn't work

Open
#248 1 comment 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

I tried onChange, onClick, in both itemRender and top level. Using Next.js

<Pagination current={this.state.currentPage} total={300} defaultPageSize={LIMIT}
                  showPrevNextJumpers={true} showTitle={false}
                  hideOnSinglePage={false} showLessItems={true}
                  itemRender={(current, type, element)=> type == 'page'  ? <span onClick={()=> console.log('works?')}>{current}</span> : element}
                  onChange={(pageNum) => console.log(pageNum)}
                  onClick={(pageNum) => console.log(pageNum)}
                  
                  />

in the source, it says ul unselectable

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 reported Pagination usage with itemRender, onChange, and onClick in a Next.js app, then inspect the pagination source around the ul unselectable behavior. Confirm whether the callbacks fire for page interactions and document the expected behavior or a focused fix.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.