question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slider onChange event not triggering

See original GitHub issue

react: 15.6.1 element-react: 1.0.18 (tested with 1.0.17 and 1.0.16 also)

When changing the value of the Slider, the handleDistanceChange is never called.

class Address extends Component {
  render () {
    return (
      <div>
        <Slider onChange={this.handleDistanceChange} />
      </div>
    );
  }

  handleDistanceChange = (value) => {
    console.log(value);
  }
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
modesscommented, Jul 18, 2017

Yup, you’re right. My bad! It works as intended when setting an initial value, thank you.

2reactions
e1emeb0tcommented, Jul 17, 2017

Thanks @modess, currently element-react is borrowing almost the code from element-ui, so the code base of Slider is a little fuzzy, there’s value, inputValue, firstValue and secondValue, that’s awful, in the next couple days, I’ll fix the onChange issue before I can make the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

onchange event on input type=range is not triggering in ...
I was having issues with the 'change' event not firing in mobile chrome (v34), but adding 'input' into the equation has fixed it...
Read more >
[Silk UI Web] Slider inputs are not triggering onChange event
Hi,. We have a range slider with two inputs on its placeholders - the values are set correctly but onChange event associated with...
Read more >
Slider onChange event not triggered with showButtons in Blazor
Bug reported in Blazor - Range Slider - Slider onChange event not triggered with ... Slider onChange event is not triggered when showButtons...
Read more >
How to trigger onchange event on input type=range while ...
It is a frequent UI design for a range slider to showcase the immediate change in the depicted value as the user moves...
Read more >
Setting a slider's value without triggering the change event
To me this is exactly why we have event and event.originalEvent. The slidechange event should fire anytime the slider value changes (not only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found