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

react-core Select creates nested form #1197

Open
kahboom opened this issue Jan 8, 2020 · 0 comments
Open

react-core Select creates nested form #1197

kahboom opened this issue Jan 8, 2020 · 0 comments

Comments

@kahboom
Copy link

kahboom commented Jan 8, 2020

For some reason, PF wraps Select in a form element, which is causing issues, as you're not really supposed to nest forms. This doesn't happen with FormSelect, which uses a normal <select> tag, but I need to use Select because it has the isCreatable option.. it seems like it was introduced in this PR: https://github.com/patternfly/patternfly-react/pull/2820/files#diff-fd84af25e09f77329b1e8c8fd1d08914R406

If you try to use Select within a Formik form, you can get errors like this:
Warning: validateDOMNesting(...): <form> cannot appear as a descendant of <form>

I am trying this workaround for a Formik custom widget I created, but it's not going so well as we are generating forms automatically based on backend-provided values and have no control over how they get rendered: jaredpalmer/formik#826 (comment)


For feature requests or enhancements, file an issue against patternfly-design.

For bug reports, please provide as much relevant info as possible:

  • What browser(s), device and OS experience the problem? Chrome, macOS Catalina
  • Are you using a PatternFly JS framework implementation [1]? Yes, patternfly-react v3.120.8
  • What are the steps to reproduce the issue and what is the expected behavior? For the the fastest support, provide a working demo or minimal reproduction using tools such as codepen or jsfiddle

Tell us more about your product/project and timeline to help prioritize this issue.

  • What product/project does this impact? Fuse Online + Syndesis
  • List product/project release(s) and timelines. Deadline was Monday, bug fixing now
  • Is this a customer reported blocking issue? No
@kahboom kahboom changed the title Select creates nested form react-core Select creates nested form Jan 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant