-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🐛[BUG]【ProTable】findDOMNode is deprecated and will be removed in the next major release. #8830
Comments
以下的 Issues 可能会帮助到你 / The following issues may help you
|
see #8837 |
react 版本降低一下 |
我也遇到了这个问题, 把和antd相关的依赖以及pro-components都升级和降级都试了, 都不行, 醉了... |
仍然没有解决官方的实例都用这个错误 |
一顿操作猛如虎, #8837 解决不了
在程序入口设置,我的是 remix 框架为例:
效果: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
提问前先看看:
https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md
🐛 bug 描述
正常情况下会出现“findDOMNode is deprecated and will be removed in the next major release.”警告,设置search和options为false后控制台报错消失
🏞 期望结果
有什么解决办法可以去除此警告
💻 复现代码
import React from "react";
import type { ActionType, ProColumns } from "@ant-design/pro-components";
import { ProTable } from "@ant-design/pro-components";
import { useRef } from "react";
const Demo = () => {
const actionRef = useRef();
const columns: ProColumns[] = [
{
dataIndex: "index",
valueType: "indexBorder",
width: 48,
},
{
title: "角色编码",
key: "code",
dataIndex: "code",
},
{
title: "角色名称",
key: "name",
dataIndex: "name",
},
{
title: "角色描述",
key: "description",
dataIndex: "description",
},
];
return (
<ProTable
columns={columns}
actionRef={actionRef}
cardBordered
request={async () => {
return {
data: [
{
id: 1,
code: 1,
name: "test",
description: "测试",
},
],
success: true,
};
}}
//search={false}
//options={false}
rowKey="id"
pagination={{
pageSize: 5,
onChange: (page) => console.log(page),
}}
dateFormatter="string"
/>
);
};
export default Demo;
© 版本信息
"@ant-design/pro-components": "^2.8.1",
"antd": "^5.21.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
🚑 其他信息
The text was updated successfully, but these errors were encountered: