1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

toggle switch input state

This commit is contained in:
sveisvei 2016-12-09 14:44:09 +01:00
parent da5381fdf9
commit 87cd3b03d1

View File

@ -64,9 +64,8 @@ class AddFeatureToggleComponent extends Component {
<Switch <Switch
checked={enabled} checked={enabled}
onChange={(v) => { onChange={() => {
// todo is wrong way to get value? setValue('enabled', !enabled);
setValue('enabled', (console.log(v.target) && v.target.value === 'on'));
}}>Enabled</Switch> }}>Enabled</Switch>
<br /> <br />
</section> </section>