diff --git a/packages/patternfly-3/patternfly-react/src/components/Slider/Slider.js b/packages/patternfly-3/patternfly-react/src/components/Slider/Slider.js index 2a7907ba87e..38efa2cbe43 100644 --- a/packages/patternfly-3/patternfly-react/src/components/Slider/Slider.js +++ b/packages/patternfly-3/patternfly-react/src/components/Slider/Slider.js @@ -17,12 +17,19 @@ class Slider extends React.Component { }; } + componentDidUpdate(prevProps) { + if (prevProps.value !== this.props.value) { + this.onSlide(this.props.value); + } + } + onSlide = value => { this.setState({ value }, () => this.props.onSlide(value)); }; onInputChange = event => { - this.setState({ value: parseInt(event.target.value || 0, 10) }); + const newValue = parseInt(event.target.value || 0, 10); + this.setState({ value: newValue }, () => this.props.onSlide(newValue)); }; onFormatChange = format => {