You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm encountering an issue where simply nesting components inside a Formsy.Form component that are built to accept children breaks rendering, usually throwing some sort of props undefined error.
I can take the same components and move them outside of the Formsy.Form and the component renders fine. I've tried this with two separate tab libs, and the result is the same. So I think Formsy is at fault here, or maybe there's something I can do to make it work right.
I think Formsy is messing with the tab component or its children in an unsavory way. Here's what the props.children looks like on that Tabs component:
Thanks for any help!
The text was updated successfully, but these errors were encountered:
ericdfields
changed the title
Error nesting certain components with props/children
Error with props/children when nesting certain components
Jun 26, 2015
Dug into this a little more today. The way in which formsy manipulates and returns its children makes it incompatible with other components that manipulate children. I've tested both react-tabs and react-simpletabs and they each get stuck looking for an array of valid React components on this.props.children, and instead get objects similar to the above screenshot.
Hi @ericdfields and thanks for looking into this! In the next version Formsy stops messing around with the children and will use "react context" instead. That will fix the issue :-)
I'm encountering an issue where simply nesting components inside a Formsy.Form component that are built to accept children breaks rendering, usually throwing some sort of props undefined error.
I can take the same components and move them outside of the Formsy.Form and the component renders fine. I've tried this with two separate tab libs, and the result is the same. So I think Formsy is at fault here, or maybe there's something I can do to make it work right.
Here is an example of a component that will trigger this behavior: https://github.com/ericdfields/formsy-tabs-demo/blob/master/client/components/Index/IndexComponent.jsx
And here it is live: http://formsy-tabs-demo.herokuapp.com … You're not going to see much; it's broken code in action!
To reiterate my point, the following breaks:
But doing this works:
I think Formsy is messing with the tab component or its children in an unsavory way. Here's what the props.children looks like on that Tabs component:
Thanks for any help!
The text was updated successfully, but these errors were encountered: