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
checked={enabled}
onChange={(v) => {
// todo is wrong way to get value?
setValue('enabled', (console.log(v.target) && v.target.value === 'on'));
onChange={() => {
setValue('enabled', !enabled);
}}>Enabled</Switch>
<br />
</section>