From 87cd3b03d17ce33f467fb78d9f39d3d4b90a950a Mon Sep 17 00:00:00 2001 From: sveisvei Date: Fri, 9 Dec 2016 14:44:09 +0100 Subject: [PATCH] toggle switch input state --- frontend/src/component/feature/form/index.jsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/component/feature/form/index.jsx b/frontend/src/component/feature/form/index.jsx index 302ccd5305..945ebf8a85 100644 --- a/frontend/src/component/feature/form/index.jsx +++ b/frontend/src/component/feature/form/index.jsx @@ -64,9 +64,8 @@ class AddFeatureToggleComponent extends Component { { - // todo is wrong way to get value? - setValue('enabled', (console.log(v.target) && v.target.value === 'on')); + onChange={() => { + setValue('enabled', !enabled); }}>Enabled