ant-design / ant-design/pro-components

🐛[BUG] editorFormRef.current?.getRowData 方法获取不到内容

Open
#7,548 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 描述

我使用EditableProTable组件 , 使用editableFormRef来引用, 当我使用editorFormRef.current?.getRowData(currentRecordPrid)方法时,
第一行的内容我能获取到,但是第二行就获取不到
currentRecordPrid这个变量是在创建一行时添加到hook里面,并且使用的是当前时间,
等于说一行都有一个唯一的prid,我使用这个prid能获取到第一行的数据,但是获取不到第二行

### 🏞 期望结果

解决问题

### 🚑 其他信息

![image](https://github.com/ant-design/pro-components/assets/109333333/6014f190-7c44-4d7c-a224-48c9e29d66cc)
![image](https://github.com/ant-design/pro-components/assets/109333333/3e4ec007-aeda-4bc2-b1f2-23ecf7738206)
![image](https://github.com/ant-design/pro-components/assets/109333333/e36d0332-4555-4963-bd7c-0f0252f12652)
![image](https://github.com/ant-design/pro-components/assets/109333333/20b4a8fa-29da-4a94-8b84-7ccee1286174)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the EditableProTable case using editableFormRef.current?.getRowData with two rows and each row's unique currentRecordPrid. Trace how the second row is created and how getRowData resolves the key; done means both the first and second rows return their expected data.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.