react-component / react-component/pagination
onChange doesn't work
Open
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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