Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

🐛[BUG]devScripts.js:6523 Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()? #756

Open
adkslf opened this issue Dec 24, 2021 · 0 comments

Comments

@adkslf
Copy link

adkslf commented Dec 24, 2021

🐛 bug 描述 引入pro-table后报警告 Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()

📷 复现步骤 [清晰描述复现步骤,让别人也能看到问题]

🏞 期望结果 没有Warning

💻 复现代码 [提供可复现的代码,仓库,或线上示例]

<ProTable
columns={columns}
bordered
request={(params, sorter, filter) => {
// 表单搜索项会从 params 传入,传递给后端接口。
console.log(params, sorter, filter);
return Promise.resolve({
data: tableListDataSource,
success: true,
});
}}
rowKey="key"
pagination={{
showQuickJumper: true,
}}
dateFormatter="string"
toolbar={{
title: '高级表格',
tooltip: '这是一个标题提示',
}}
search={{
span: 6
}}
toolBarRender={() => [

创建应用

]}
/>

© 版本信息

  • Ant Design Pro 版本: V5
  • @ant-design/pro-table: "^2.56.0",
  • antd: "4.17.1",
  • umi 版本:^3.5.0
  • 浏览器环境:Google
  • 开发环境 [e.g. mac OS]

🚑 其他信息

image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant