Skip to content

Commit

Permalink
fix: radioGroup组件在form中报警告
Browse files Browse the repository at this point in the history
  • Loading branch information
onshinpei committed Jan 12, 2022
1 parent 6cc1676 commit c636785
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/components/Radio/Group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ function getCheckedValue(children: React.ReactNode) {
});
return matched ? { value } : undefined;
}

const RadioGroup: FC<RadioGroupProps> = props => {
const InternalRadioGroup: React.ForwardRefRenderFunction<unknown, RadioGroupProps> = (props, ref) => {
const {
prefixCls,
className = '',
Expand Down Expand Up @@ -142,7 +141,7 @@ const RadioGroup: FC<RadioGroupProps> = props => {
</RadioContextProvider>
);
};

const RadioGroup = React.forwardRef(InternalRadioGroup);
RadioGroup.defaultProps = {
disabled: false,
prefixCls: 'fishd-radio',
Expand Down

0 comments on commit c636785

Please sign in to comment.