You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
正常情况下会出现“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";
提问前先看看:
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: