Skip to content

Commit 4f479c1

Browse files
committed
fix: remove formRadioGroup since the inner field applies the error correctly
1 parent f24a95e commit 4f479c1

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/Form.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Form extends Component<IFormProps & { forwardedRef: any }> {
4747

4848
static RadioGroup = (
4949
props: Omit<IFormsyRadioGroupProps, keyof InjectedProps<any>>
50-
) => <FormsyRadioGroup formRadioGroup {...(props as any)} />;
50+
) => <FormsyRadioGroup {...(props as any)} />;
5151

5252
static Dropdown = (
5353
props: Omit<IFormsyDropdownProps, keyof InjectedProps<any>>

src/FormsyRadioGroup.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ export interface IFormsyRadioGroupProps
2222
id?: string;
2323
inputClassName?: string;
2424
passRequiredToField?: boolean;
25-
formRadioGroup?: boolean;
2625
defaultSelected?: string;
2726
label?: string | React.ReactNode;
2827
errorLabel?: React.ReactElement;
@@ -56,7 +55,6 @@ class FormsyRadioGroup extends Component<IFormsyRadioGroupProps> {
5655
as,
5756
label,
5857
required,
59-
formRadioGroup,
6058
children,
6159
name,
6260
value,
@@ -107,9 +105,6 @@ class FormsyRadioGroup extends Component<IFormsyRadioGroupProps> {
107105
disabled,
108106
};
109107

110-
if (formRadioGroup) {
111-
props.error = error;
112-
}
113108
return (
114109
<Form.Field {...fieldProps}>
115110
{cloneElement(radio, { ...props })}

0 commit comments

Comments
 (0)