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

Slider duplicating on rerender #49

Open
dlaprell opened this issue Oct 20, 2017 · 1 comment
Open

Slider duplicating on rerender #49

dlaprell opened this issue Oct 20, 2017 · 1 comment

Comments

@dlaprell
Copy link

When I use the Slider component and a rerender happens (state or props change), then the slider will be duplicated.

Might possibly be the same error source as #7? (A problem with the remounting by mdl)

Minimal setup:

class SliderTest extends Component {
  updateState = e => {
    this.setState({
      value: e.target.valueAsNumber
    })
  }

  render(_, { value }) {
    return (
      <div>
        <Slider name='test' min={0} max={100} value={value} onChange={this.updateState} />
      </div>
    )
  }
}

After some changes will render this:

duplicatingslieders

For an example see here:
https://codesandbox.io/s/6wx9r52lw

I will try to tackle this myself as well, but I do not know if my prect / mdl knowledge is enough for that 😅 .

@jon-grangien
Copy link

jon-grangien commented Feb 1, 2018

Maybe this is why the onInput callback doesn't seem to work for me? You can drag it a bit but then it hangs.

edit: Jumped the gun, don't think it's related, also I'm not getting this issue.

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

2 participants