Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.
This repository was 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

@adkslf

Description

@adkslf

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions