summaryrefslogtreecommitdiff
path: root/app/client/common
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-19 01:28:58 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-19 01:28:58 +0100
commit55f508101615441bba88e9d5ff305ad0e5029091 (patch)
treecd24f281602a89e88c7af992cf8562025089af01 /app/client/common
parent297e991ee49c5f0f1cc91fee72800f6dc040d097 (diff)
deploy bundle
Diffstat (limited to 'app/client/common')
-rw-r--r--app/client/common/slider.component.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/client/common/slider.component.js b/app/client/common/slider.component.js
index 9dba730..bb5c9f1 100644
--- a/app/client/common/slider.component.js
+++ b/app/client/common/slider.component.js
@@ -16,8 +16,11 @@ class Slider extends Component {
this.handleRange = this.handleRange.bind(this)
}
componentWillReceiveProps(nextProps) {
- const next_value = nextProps.value || nextProps.opt[nextProps.name]
+ let next_value = nextProps.value || nextProps.opt[nextProps.name]
if (next_value !== this.state.value) {
+ if (this.props.type === 'int') {
+ next_value = parseInt(next_value)
+ }
this.setState({ value: next_value });
}
}