Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Value Dynamically #1

Open
digimatt22 opened this issue Apr 14, 2019 · 4 comments
Open

Updating Value Dynamically #1

digimatt22 opened this issue Apr 14, 2019 · 4 comments

Comments

@digimatt22
Copy link

Using your control in a project but when I set the value as this.state.value and update this.state.value via another means (not using the slider) the thumb position isn't updated. How can I make this happen?

@wilddogqi
Copy link

refComponent.forceUpdate(newColor)

@johnplayer107
Copy link

johnplayer107 commented Jul 14, 2020

hezhii, Hi cant dynamically change the value of the slider. when a state changes then according to the value of that state the slider value and slider fill should also change. Kindly make it ASAP..!!!

@Miroxyz
Copy link

Miroxyz commented Sep 9, 2022

add componentDidUpdate in CircularSlider.js

  componentDidUpdate(prevProps, prevState, snapshot) {
    if (prevProps.value !== this.props.value) {
      this.setState({value: this.props.value});
    }
  }

@flegald
Copy link

flegald commented Jun 24, 2023

I feel that @Miroxyz 's solution here should be merged into prod?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants