Comments (7)
ref #8382
from pro-components.
你好,有修复这个问题的计划吗?或者是有可以手动去解决 @fnoopv
from pro-components.
你好,有修复这个问题的计划吗?或者是有可以手动去解决 @fnoopv
是rc-util
库的问题,只能等他们修,别的没办法
from pro-components.
貌似Tooltip的children渲染为null时会出现该警告#48709
这种情况可以在这个库使用Tooltip时避免
from pro-components.
"antd": "4.24.15",
"react": "18.2.0",
"react-dom": "18.2.0",
锁版本解决了这个问题,node16.20.2 npm8.19.4
from pro-components.
貌似Tooltip的children渲染为null时会出现该警告#48709 这种情况可以在这个库使用Tooltip时避免
为何在严格模式中有时候会出现 findDOMNode is deprecated 这个警告?
这是由于 rc-trigger 的实现方式导致的,rc-trigger 强制要求 children 能够接受 ref,否则就会 fallback 到 findDOMNode,所以 children 需要是原生 html 标签,如果不是,则需要使用 React.forwardRef 把 ref 透传到原生 html 标签。
另外我在使用 umi-plugin-layout
的菜单也出现了这个问题
![](https://private-user-images.githubusercontent.com/47456577/343603817-cfd90e52-f5a4-4537-9a95-cab5509a9751.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4MDg4NzcsIm5iZiI6MTcyMzgwODU3NywicGF0aCI6Ii80NzQ1NjU3Ny8zNDM2MDM4MTctY2ZkOTBlNTItZjVhNC00NTM3LTlhOTUtY2FiNTUwOWE5NzUxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE2VDExNDI1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdlNWE2Yzc2ZTQ2ZDM0YzMzMWFlNDJjODc5NDE5ZTQzYzdmYTdiYjFkNTFiOTk0NjliMDlhYjFmNjcwMjY4N2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hw0AFtIjpKVbLa8yfbG3j2Q1E3jjGzNy_8G0w2FbTwI)
导致问题的代码位置
umi-plugin-layout
的 menuItemRender
返回了一个 umi
的 Link
组件 代码位置
然后 pro-components
的 MenuItemTooltip
直接用 Tooltip
包住了返回的 Link
组件 代码位置
上述代码导致 Tooltip
直接包住了一个不能够接受 ref
的 Link
,所以出现了这个问题
可能的改进办法
- 在
MenuItemTooltip
的props.children
外包一层可接受ref
的标签 - 在
umi-plugin-layout
的menuItemRender
返回的Link
组件外包一层可接受ref
的标签
from pro-components.
"antd": "4.24.15", "react": "18.2.0", "react-dom": "18.2.0", 锁版本解决了这个问题,node16.20.2 npm8.19.4
这个不是pro-components的错误么,你锁了antd的版本就没问题了?
from pro-components.
Related Issues (20)
- 🐛[BUG] CheckCard 'defaultValue' doesnt work in form
- ProLayout 在top模式下,定制菜单背景色后,二级菜单能否按一级的展示,现在官网的例子里都是全白,文字看不清楚🐛[BUG] HOT 2
- 🐛[BUG]官网可拖动编辑表格未生效
- 🐛[BUG]findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference HOT 1
- 🧐[问题]使用ProTable控制台的警告怎么去掉啊!!!!看着膈应人😔 HOT 4
- ProForm 报错 React does not recognize the `showCount` prop on a DOM element HOT 1
- 为什么ProTable的search里的submitterColSpanProps里的span属性一定要number类型?
- 🐛[BUG] DrawerForm 存在的 onFinish 存在执行上下文问题
- 👑 [需求] CheckCard 文档缺失 subTitle(副标题)属性
- 🐛[BUG]<ProConfigProvider hashed={false}>对侧边Menu无效
- 🧐[问题]Cannot find module '@ant-design/pro-components'
- 🐛[BUG] submitButtonProps = false不生效, 提交按钮还是会显示
- 🐛[BUG]使用hash路由配合Protable的syncToUrl参数时,searchParams参数始终保留的问题
- 🧐[问题]在使用Schema Form - JSON表单的时候,如果某一个值关联另外的两个值,如果关联的这两个值修改值,该值需要置空,在还未点击查询的情况下就直接提示了必填,期望是当点击查询的时候才提示必填
- 🧐[问题]ModalForm用于修改的时候request重复请求同一数据导致表单不更新 HOT 3
- 🧐[问题] 如何透過 column 配置將 ProTable search 輸入欄合併
- 🧐[问题] Layout的主题色最新的只有纯白或者纯黑了吗?
- 🐛[BUG]ProFormSelect使用fieldNames配置字段后options的类型无法正确识别
- 🐛[BUG] PageContainer 上面会留白,如何去掉
- 🐛[BUG]紧凑和宽松的折叠表单排版有点问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pro-components.