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

wrappedComponentRef is not working with functional components #16999

Closed
halitogunc opened this issue Jun 6, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@halitogunc
Copy link

commented Jun 6, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  • Go to the link
  • Click show form button
  • Type your name and click OK.

What is expected?

The instance of Form

What is actually happening?

It could not get the instance.

Environment Info
antd 3.19.2
React 16.8.6
System macOS Mojave 10.14.5
Browser Chrome: Version 74.0.3729.169 (Official Build) (64-bit)

  • I am using fully functional components with new hooks api and trying to validate Form which is inside of a Modal. The weird thing is if I use withRef which is deprecated instead of wrappedComponentRef, it is working.
  • I have added both of the cases to the example.
@zombieJ

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.