tdesign-react
tdesign-react copied to clipboard
[Popconfirm] children 传入没有 ref 的函数组件时报错Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
tdesign-react 版本
0.35.1
重现链接
No response
重现步骤
popConfirm 组件 children 使用没有 ref 的函数组件时报错 Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
期望结果
期望能够做个兼容,支持非 ref 组件使用
实际结果
No response
框架版本
浏览器版本
No response
系统版本
No response
Node版本
No response
补充说明
No response
👋 @fangxiezhen,感谢给 TDesign 提出了 issue。 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
♥️ 有劳 @dengxiao0509 @uyarn @carolin913 尽快确认问题。 确认有效后将下一步计划和可能需要的时间回复给 @fangxiezhen 。
popup 依赖ref获取dom元素导致的,这周重构一下换一种实现思路吧,很多function component 并没有处理 forwardRef 逻辑
popup 依赖ref获取dom元素导致的,这周重构一下换一种实现思路吧,很多function component 并没有处理 forwardRef 逻辑
是的,必须依赖 ref 这种方式实在太过不优雅,期待优化
这个 Issue 被标记为了过时 stale ,因为它已经持续 30 天没有任何活动了。删除 stale 标签或评论,否则将在 7 天内关闭。
0.40.0 fixed