Skip to content

Commit

Permalink
fix:修复CheckBox组件onChange传递值
Browse files Browse the repository at this point in the history
  • Loading branch information
SunLxy committed Jul 14, 2023
1 parent 045ad1a commit 3aba30f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/CheckBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function CheckBox(props: CheckBoxProps) {
const onPress = () => {
const { onChange } = props;
if (Reflect.has(props, 'checked')) {
onChange && onChange(state.checked);
onChange && onChange(!state.checked);
} else {
setState({ checked: !state.checked });
onChange && onChange(!state.checked);
Expand Down

0 comments on commit 3aba30f

Please sign in to comment.