From 27cc37e20e027f805c8027e005940c3aebf5bd04 Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Fri, 10 Jun 2022 23:10:19 +0800 Subject: [PATCH 1/2] fix(radio-group): remove the default value of the component size prop --- components/radio/Group.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/radio/Group.tsx b/components/radio/Group.tsx index 59c901dce6..7b29700d82 100644 --- a/components/radio/Group.tsx +++ b/components/radio/Group.tsx @@ -23,7 +23,7 @@ export type RadioGroupChildOption = { export const radioGroupProps = () => ({ prefixCls: String, value: PropTypes.any, - size: PropTypes.oneOf(RadioGroupSizeTypes).def('default'), + size: PropTypes.oneOf(RadioGroupSizeTypes), options: { type: Array as PropType>, }, From a0816ca5b077800618dfec7ab6179e1a0abe8c6c Mon Sep 17 00:00:00 2001 From: bqy_fe <1743369777@qq.com> Date: Fri, 10 Jun 2022 23:31:47 +0800 Subject: [PATCH 2/2] update test --- .../radio/__tests__/__snapshots__/group.test.js.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/radio/__tests__/__snapshots__/group.test.js.snap b/components/radio/__tests__/__snapshots__/group.test.js.snap index 1cfc6747b5..28a8170c52 100644 --- a/components/radio/__tests__/__snapshots__/group.test.js.snap +++ b/components/radio/__tests__/__snapshots__/group.test.js.snap @@ -1,9 +1,9 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Radio all children should have a name property 1`] = `
`; +exports[`Radio all children should have a name property 1`] = `
`; -exports[`Radio fire change events when value changes 1`] = `
`; +exports[`Radio fire change events when value changes 1`] = `
`; -exports[`Radio fire change events when value changes 2`] = `
`; +exports[`Radio fire change events when value changes 2`] = `
`; -exports[`Radio passes prefixCls down to radio 1`] = `
`; +exports[`Radio passes prefixCls down to radio 1`] = `
`;