Skip to content

Commit

Permalink
fix: FieldWrapper… ID fallback support STILL incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed May 20, 2024
1 parent c03ee3a commit 8932544
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const FormikCheck: React.FC<FormikInputProps> = ({
}: FormikInputProps) => {
return (
<FieldWrapper
id={id}
id={id || field.name}
label={label}
required={required}
description={description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const FileInputDropZoneFormField: React.FC<FormikFileInputProps> = ({
};
return (
<FieldWrapper
id={id}
id={id || field.name}
label={label}
required={required}
description={description}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const FormikInput: React.FC<FormikInputProps> = ({
description={description}
formik={{ field, form, meta }}
>
<input {...field} {...props} id={id} />
<input {...field} {...props} id={id || field.name} />
</FieldWrapper>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const FormikTextarea: React.FC<FormikSelectProps> = ({
description={description}
formik={{ field, form, meta }}
>
<select {...field} {...props} id={id}>
<select {...field} {...props} id={id || field.name}>
{children}
</select>
</FieldWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const FormikTextarea: React.FC<FormikTextareaProps> = ({
description={description}
formik={{ field, form, meta }}
>
<textarea {...field} {...props} id={id} />
<textarea {...field} {...props} id={id || field.name} />
</FieldWrapper>
);
};
Expand Down

0 comments on commit 8932544

Please sign in to comment.