react-component / react-component/slider
Slider can only move by one step
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.1k
- Forks
- 768
- Avg merge
- 11d 22h
- Merged PRs (30d)
- 5
Description
I am using Slider like this:
<Slider
range
className="t-slider"
min={0}
max={120}
step={15}
marks={Object.fromEntries(range(0, 121, 15).map(t=>[t, formatTimestamp(t, 60)]))}
value={paragraphLength}
onChange={(v) => {setParagraphLength(v);}}/>
When dragging the slider, it gets released after a single step, so the user needs to grab it again to drag another step. A similar observation was reported in #363. However, in contrast to the code there, I do not create a Range during render (I do not create it at all).
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 Slider component and reproduce the provided range configuration: range, min 0, max 120, step 15, marks, and a controlled value. Trace the drag interaction to determine why the handle is released after one step, then verify that dragging can cross multiple steps without recreating a Range during render.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100