ant-design / ant-design/pro-components

🐛[BUG]EditableProTable组件editable中的actionRender中拿不到最新的react state状态

Open
#8,724 0 comments 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 描述

image

### 📷 复现步骤

声明react状态,再actionRender中使用,拿不到最新的值。

### 🏞 期望结果

期望state是当前的

### 💻 复现代码

image

### © 版本信息

- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start at the EditableProTable component and its actionRender entry point, then reproduce the reported case using the code shown in the issue images. Check how the callback accesses React state and verify whether it observes the latest value. Done means actionRender receives the current state value in the reproduction case.

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
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.