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:
parent
da5381fdf9
commit
87cd3b03d1
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user