react-component / react-component/slider

Issue with slider

Open
#677 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
3.1k
Forks
768
Avg merge
11d 22h
Merged PRs (30d)
5

Description

So I have a range slider with tooltips.
My problem is that I use custom onChange and value.

<Range
    className="c-range"
    value={valueState}
    onChange={value => setValueState(value)}
    min={minPossible}
    max={maxPossible}
/>

If I just use Slider.Range without tooltips it works fine. But when I do:

const { createSliderWithTooltip } = Slider;
const Range = createSliderWithTooltip(Slider.Range);

And use Range like in the example above, the value only changes by 1 until I let go and click again.

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 at createSliderWithTooltip and compare its controlled value and onChange behavior with Slider.Range without tooltips. Reproduce the provided example and verify that a controlled range updates continuously while dragging, rather than advancing only one step until the next click.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.