patternfly-3
patternfly-3 copied to clipboard
react-core `Select` creates nested form
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: https://github.com/jaredpalmer/formik/issues/826#issuecomment-425961649
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