ant-design / ant-design/pro-components

🐛[BUG]react 18 使用ProTable报错

Open
#9,093 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

### 🐛 bug 描述

react 18 使用
ProTable组件
报错:
```
findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely
```

### 📷 复现步骤
https://pro-components.antdigital.dev/components/table?tab=api¤t=1&pageSize=5
随便复制一个dmeo代码放到react 18项目中就会报错。

### 🏞 期望结果

### 💻 复现代码

https://pro-components.antdigital.dev/components/table?tab=api¤t=1&pageSize=5
随便复制一个dmeo代码放到react 18项目中就会报错。

### © 版本信息

- ProComponents 版本:2.8.7
- React: 18.3.1
- umi 版本:4.4.10
- 浏览器环境:'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 Edg/133.0.0.0'
- 开发环境:Windows11 24h2

### 🚑 其他信息

![Image](https://github.com/user-attachments/assets/e8334f78-159a-40f4-b6b0-d1d5bbd179d3)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the linked ProTable demo with React 18.3.1, ProComponents 2.8.7, and umi 4.4.10, then trace the source of the findDOMNode warning. Confirm the expected behavior with the issue reporter and verify that the warning no longer appears in the same setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.