From 0b4241c0a8e0d3fa9c130d3ca6b3d64cdda43cac Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 21 May 2018 13:23:19 +0200 Subject: toggles and layout adjust --- app/client/common/paramGroup.component.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'app/client/common/paramGroup.component.js') diff --git a/app/client/common/paramGroup.component.js b/app/client/common/paramGroup.component.js index ccff0b0..2533642 100644 --- a/app/client/common/paramGroup.component.js +++ b/app/client/common/paramGroup.component.js @@ -4,13 +4,28 @@ import { bindActionCreators } from 'redux' import * as liveActions from '../live/actions' class ParamGroup extends Component { + constructor(props){ + super(props) + this.handleClick = this.handleClick.bind(this) + } + handleClick(e){ + clearTimeout(this.timeout) + let new_value = e.target.checked + this.props.actions.set_param(this.props.name, new_value) + } render() { const props = this.props + const checked = this.props.opt[this.props.name] + const className = checked ? 'paramGroup active' : 'paramGroup inactive' return ( -
+
{props.children}
-- cgit v1.2.3-70-g09d2