-
-
Notifications
You must be signed in to change notification settings - Fork 47.5k
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
从父组件调用Form组件中的用户自定义函数 #2843
Comments
也遇到了同样的问题,现在只能通过._reactInternalInstance._renderedComponent._instance方式来获取 |
@EvilsZero 可以给个能反映出问题的 demo 么。。还有步骤。 |
抱歉哈,您看这个可以吗? 本地环境
做的处理
期待的结果:通过App的函数打开Dialog里的Modal 实际上的结果:只有第一个按钮可以,第二个无法打开 在线演示 |
其余条件不变,做了withRef的补充,仍然出现问题在线地址: |
这儿改坏了 #2534 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
本地环境
你做了什么?
引入了antd的Modal和Form,
自己构建的一个基于Modal的Component,用Form.create({withRef: true})(Modal)包裹
在其父组件中用ref找到对应的组件, 无法在该组件里找到原Component中的用户自定义的函数
在之前的版本中(1.6.5),可以在ref中的wrappedComponent中找到对应函数
你期待的结果是:
可以找到 用Form创建的组件中的用户自定义的函数
实际上的结果:
找不到用户自定义的函数
可重现的在线演示
The text was updated successfully, but these errors were encountered: