We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 68873fa + 6eead26 commit 44473bcCopy full SHA for 44473bc
packages/ant-component-mapper/src/switch/switch.js
@@ -23,7 +23,7 @@ export const Switch = (props) => {
23
...props,
24
type: 'checkbox'
25
});
26
- const { name, value, onChange, onBlur } = input;
+ const { name, checked, onChange, onBlur } = input;
27
28
return (
29
<FormGroup
@@ -37,9 +37,9 @@ export const Switch = (props) => {
37
>
38
<AntSwitch
39
{...rest}
40
- defaultValue={input.value ? input.value : undefined}
+ defaultValue={input.checked ? input.checked : undefined}
41
onChange={onChange}
42
- checked={value}
+ checked={checked}
43
name={name}
44
onClick={onBlur}
45
checkedChildren={onText}
0 commit comments