[Zoom] Not accepting child component
See original GitHub issueFirst of all, Thanks for giving this beautiful framework. It has always been a great experience to work with Material-UI.
Today, I updated my project to @material-ui/core@next. Successfully removed all deprecated props. But, failed to solve this issue. Prior to v4 this was working.
- [ x ] This is not a v0.x issue.
- [ x ] I have searched the issues of this repository and believe that this is not a duplicate.
// Input Field component
const InputField = ({
field,
form: { touched, errors },
...props
}) => {
const error = errors[field.name];
return (
<TextField
variant="outlined"
margin="dense"
error={touched && error ? true : false}
helperText={touched && error ? `- ${error}` : null}
fullWidth
{...field}
{...props}
/>
);
};
Expected Behavior 🤔
Zoom component is not accepting a <Field/> component from Formik as child.
import { Field } from 'formik';
<Zoom in={show}>
<Field
name="title"
type="text"
variant="outlined"
margin="dense"
component={InputField}
/>
</Zoom>
Current Behavior 😯
Zoom should be given a <div/> to wrap the <Field/> component
import { Field } from 'formik';
<Zoom in={show}>
<div>
<Field
name="title"
type="text"
variant="outlined"
margin="dense"
component={InputField}
/>
</div>
</Zoom>
Error
I am getting this error in the console.
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Check the render method of `Transition`.
Context 🔦
I am trying to animate fields/buttons in form whenever the form appears in the DOM.
Your Environment 🌎
| Tech | Version |
|---|---|
| Material-UI | ^4.0.0-beta.0 |
| React | ^16.8.6 |
| Browser | Chromium: 74.0.3729.108 |
Fun Fact: This is my first contribution 😋
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
[Zoom] Not accepting child component · Issue #15515 - GitHub
Today, I updated my project to @material-ui/core@next . Successfully removed all deprecated props. But, failed to solve this issue. Prior to v4 ...
Read more >Managing Zoom Mesh parents and children - Zoom Support
Click the Devices tab. Devices that have been assigned as a parent or child during a webinar or event will be displayed. Note:...
Read more >React Passing a function as prop to child component, but the ...
the zoom is not updated into 13 i want the zoom variable to be changend in the parent component when passing the function...
Read more >Pass Multiple Children to a React Component with Slots
This component needs to be able to accept multiple children and place them in the layout as it sees fit – not right...
Read more >Coping With COVID Part 2: Back To School Stress
Children's Hospital Colorado / PIP FREE Zoom Event | Coping With COVID Part ... This event is FREE on Zoom and NO previous...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@vkasraj #15526 should actually fix this.
It seems we won’t fix this here: #15519. I believe Formik should forward the ref. I have shared a workaround: https://github.com/jaredpalmer/formik/pull/478#issuecomment-487742488.