Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send name in custom componennt #3744

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/formik/src/Field.tsx
Expand Up @@ -196,14 +196,14 @@ export function Field({
const { innerRef, ...rest } = props;
return React.createElement(
component,
{ ref: innerRef, ...field, ...rest },
{ ref: innerRef, ...field, name, ...rest },
children
);
}
// We don't pass `meta` for backwards compat
return React.createElement(
component,
{ field, form: formik, ...props },
{ field, form: formik, name, ...props },
children
);
}
Expand All @@ -215,7 +215,7 @@ export function Field({
const { innerRef, ...rest } = props;
return React.createElement(
asElement,
{ ref: innerRef, ...field, ...rest },
{ ref: innerRef, ...field, name, ...rest },
children
);
}
Expand Down