From 1abd7f45ce6893f2beb7ccd4c6f89c6831d65409 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Tue, 15 Mar 2016 01:34:49 +0000 Subject: [PATCH] fix setting custom power levels --- src/components/views/elements/PowerSelector.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/PowerSelector.js b/src/components/views/elements/PowerSelector.js index c47c9f3809..118ade8151 100644 --- a/src/components/views/elements/PowerSelector.js +++ b/src/components/views/elements/PowerSelector.js @@ -45,8 +45,10 @@ module.exports = React.createClass({ }, onSelectChange: function(event) { - this.state.custom = (event.target.value === "Custom"); - this.props.onChange(this.getValue()); + this.setState({ custom: event.target.value === "Custom" }); + if (event.target.value !== "Custom") { + this.props.onChange(this.getValue()); + } }, onCustomBlur: function(event) {