Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Can't dynamically add bounds

Open
#853 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Domain
frontend

Research direction

Start by running the provided CarSlider reproduction and inspect the Range behavior when its controlled value and min/max bounds change together. Trace the relevant range and tooltip handling, then verify the expected handle and tooltip movement with dynamic bounds. Done means the reproduction behaves like the hard-coded-bound case, with a regression test or documented verification for the dynamic case.

Written by the indexing model from the issue text.

Description

Maybe it's a bug in a library or something because the problem is fairly simple. I just need min and max values added dynamically. Here is the minimum working example of the implementation:

const CarSlider = () => {
  const [defaultValues, setDefaultValues] = useState([800, 1000]);

  const onChange = defaultValues => {
    setDefaultValues(defaultValues);
  };

  return (
    <div className='range-alignment'>
      <div className='range-text'>
        <p>Preisklasse</p>
        <p className='range-price'>
          {defaultValues[0]}€ - {defaultValues[1]}€
        </p>
      </div>
      <div className='range-btn-align'>
        <div className='range-width'>
          <Range
            defaultValue={[defaultValues[0], defaultValues[1]]}
            value={[defaultValues[0], defaultValues[1]]}
            allowCross={false}
            range
            tipFormatter={value => `${value}`}
            tipProps={{ visible: true }}
            min={defaultValues[0]}
            max={defaultValues[1]}
            onChange={onChange}
          />
        </div>
        <button className='range-button'>Filter</button>
      </div>
    </div>
  );
};

export default CarSlider;

In the code above values change but the two tooltips dont move with the cursor. When hardcoding the values min={800} and max={1000} everything works as it should. I double-checked the typeof both defaultValues and they are numbers which is appropriate data type for min and max. I need these values to not be hard-coded.

Dominant language
TypeScript
Stars
3.1k
Forks
766
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from react-component/slider

All issues in react-component/slider

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.