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

Can't use Fragment as 'component' in FormSection component. #3959

Closed
ryami333 opened this issue Apr 4, 2018 · 2 comments
Closed

Can't use Fragment as 'component' in FormSection component. #3959

ryami333 opened this issue Apr 4, 2018 · 2 comments

Comments

@ryami333
Copy link
Contributor

ryami333 commented Apr 4, 2018

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

When using the FormSection component, you can't use Fragment in the component prop. Eg:

return (
    <FormSection
        name="foo"
        component={Fragment}
    />
);

The following error message is shown in the console:

Warning: Failed prop type: Invalid prop `component` supplied to `FormSection`.

What is the expected behavior?

I would actually expect that FormSection should act like a Fragment by default, but at the very least it should support it as a component prop.

Other information

Can use the following workaround:

return (
    <FormSection
        name="foo"
        component={
            props => <Fragment {...props} />
        }
    />
);
@gustavohenke
Copy link
Collaborator

Duplicate of #3859

@gustavohenke gustavohenke marked this as a duplicate of #3859 Apr 4, 2018
@lock
Copy link

lock bot commented Apr 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants