-
CodeSandBoxhttps://codesandbox.io/s/angry-allen-xwwvr 错误信息
原因Popover 组件需要传递 ref 给 children,自定义组件没有考虑该需求。 解决方式能否在 FormLayout 内部对 children 包裹一下,不要让 ref 往下传递了,组件内部消化。 |
Beta Was this translation helpful? Give feedback.
Answered by
janryWang
May 10, 2021
Replies: 2 comments 13 replies
-
给个codesandbox吧 |
Beta Was this translation helpful? Give feedback.
1 reply
-
这跟FormLayout没关系,是用connect,内部强制做了forwardRef包装,主要为了方便于接入第三方组件,如果仅仅只是开发业务自定义组件,推荐还是使用hook的形式来做 |
Beta Was this translation helpful? Give feedback.
12 replies
Answer selected by
janryWang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这跟FormLayout没关系,是用connect,内部强制做了forwardRef包装,主要为了方便于接入第三方组件,如果仅仅只是开发业务自定义组件,推荐还是使用hook的形式来做