react-component / react-component/slider

Incorrect value displaying on dynamically changing min value to equal to max value

Open
#860 0 comments 0 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

Steps to reproduce:

  1. Set up min to 1 max to 10
  2. Change value to 5
  3. Change min to 10

Expected: handle positioned on start of rail, track width = 0.
Current: handle positioned on center of rail, track width != 0.

Codesandbox to repoduce: https://codesandbox.io/s/jolly-leftpad-p040z6?file=/src/App.js

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 with the Codesandbox reproduction in src/App.js and reproduce the sequence of changing min from 1 to 10 after setting the value to 5. Trace the slider's min, max, handle-position, and track-width updates. Done means the handle reaches the start of the rail and the track width becomes 0 when min equals max.

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.