We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abab0d4 commit 033a38bCopy full SHA for 033a38b
packages/patternfly-3/patternfly-react/src/components/Slider/Slider.js
@@ -17,12 +17,19 @@ class Slider extends React.Component {
17
};
18
}
19
20
+ componentDidUpdate(prevProps) {
21
+ if (prevProps.value !== this.props.value) {
22
+ this.onSlide(this.props.value);
23
+ }
24
25
+
26
onSlide = value => {
27
this.setState({ value }, () => this.props.onSlide(value));
28
29
30
onInputChange = event => {
- this.setState({ value: parseInt(event.target.value || 0, 10) });
31
+ const newValue = parseInt(event.target.value || 0, 10);
32
+ this.setState({ value: newValue }, () => this.props.onSlide(newValue));
33
34
35
onFormatChange = format => {
0 commit comments