ant-design / ant-design/pro-components

🐛[BUG]EditableProTable可新增多行时,点击默认保存按钮,会校验多行,期望只校验当前行

Open
#8,085 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可新增多行时,点击默认保存按钮,会校验多行,期望只校验当前行

### 📷 复现步骤
https://procomponents.ant.design/components/editable-table#%E4%B8%8E-formitem-%E9%85%8D%E5%90%88
官网的`与 FormItem 配合`示例,新增两行后,只填写一行的信息,点击保存,会校验两行的数据。两行信息都填写完整后点击保存,只会保存一行的数据。
![image](https://github.com/ant-design/pro-components/assets/28568597/d975d2c9-9401-4b2a-9431-9ceeab7817d7)
![image](https://github.com/ant-design/pro-components/assets/28568597/861f9f86-6070-477a-af4f-86393901f953)

### 🏞 期望结果
点击保存时,要么所有行信息都校验,然后保存所有行信息;要么只校验当前行信息,保存当前行信息。而此处保存按钮的位置,应该是只校验当前行信息,保存当前行信息

### 💻 复现代码

### © 版本信息

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start with the linked EditableProTable “与 FormItem 配合” example and reproduce the case by adding two rows, filling only one, and clicking save. Then trace the EditableProTable save and validation flow; done means the save action consistently validates and saves only the current row, or consistently validates and saves all rows as documented.

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
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.