Skip to content

Commit

Permalink
fix(checkbox): checkbox-group type
Browse files Browse the repository at this point in the history
  • Loading branch information
byq1213 committed Sep 4, 2024
1 parent 5e59f93 commit 6b314ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/checkbox/CheckboxGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface CheckboxGroupProps extends TdCheckboxGroupProps, StyledProps {
}

// 将 checkBox 的 value 转换为 string|number
const getCheckboxValue = (v: CheckboxOption): string | number => {
const getCheckboxValue = (v: CheckboxOption): string | number | boolean => {
switch (typeof v) {
case 'number' || 'string':
return v as string | number;
Expand Down Expand Up @@ -106,6 +106,7 @@ export function CheckboxGroup(props: CheckboxGroupProps) {
setInternalValue(Array.from(checkedSet), {
e,
current: checkProps.checkAll ? undefined : (checkValue as TdCheckboxProps),
option: checkProps,
type: checked ? 'check' : 'uncheck',
});
},
Expand Down

0 comments on commit 6b314ed

Please sign in to comment.