react-component / react-component/slider
Setting max to 0 does not properly set the slider to 0
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 768
- Avg merge
- 11d 22h
- Merged PRs (30d)
- 5
Description
I'm using the slider in a way where I first set the slider's max to 0, and immediately thereafter set the value to 0 as well.
I'd expect the slider to be at 0, but it does not look to be. I understand this might happen because both max and min are at 0, so I'd suggest that when this is the case, the slider handle is set at the 0 position to the left.
Here's the reproduction:
https://codesandbox.io/s/628pvx5w8n
Set the slider to any value, then click the button to see it getting stuck at that place.
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 with the linked CodeSandbox reproduction, then trace the slider's max and value handling in the repository. Reproduce the case where both are set to 0 and verify that the handle moves to the leftmost position when the fix is complete.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100