react-component / react-component/slider

onAfterChange fired when changing max value

Open
#394 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I am dynamically setting the max value in different situations, and every time max is changed, onAfterChange is fired.

Example:

          <SliderWithTooltip
            included={true}
            tipFormatter={this.percentFormatter}
            tipProps={{ overlayClassName: "foo" }}
            onAfterChange={this.afterSliderChange}
            max={this.state.selectedAsset.data.duration}
          />

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 the SliderWithTooltip component and trace how updates to the max prop are handled. Reproduce the example with a changing max value, then verify that max updates no longer invoke onAfterChange while user slider changes still do.

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
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.