react-component / react-component/slider
Is it possible to attach on onClick callback to Range’s dots and/or handles to obtain the index?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 768
- Avg merge
- 11d 22h
- Merged PRs (30d)
- 5
Description
Currently when you click a handle onChange isn’t called. That’s fine.
I’d like to attach some additional behaviour to a clicked handle, however. That is, When clicking a handle I’d like to be able to set the defaultValue to [${handleIndex, ${handleIndex}].
So either having an onHandleClicked handler would work or an onDotClicked, so long as the event included the index of the handle/dot.
Is something like this possible already?
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 at the Range component entry point and trace how clicks on handles and dots are currently handled, especially where onChange is intentionally not called for handle clicks. Define the callback behavior and index provided for each clickable element, then verify that clicking a handle or dot invokes it with the expected index.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100