ant-design / ant-design/pro-components

🧐[问题] ProForm + EditableProtable里面的input输入框在校验失败时没有error状态

Open
#8,348 3 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

### 🧐 问题描述

EditableProtable的input输入框我设置了必填,可以看第一张截图,第一个input输入框没有用renderFormItem,可以正常展示error状态,第二个input输入框用了 renderFormItem返回一个输入框, 在校验失败的时候,输入框不会变红,请问大佬们知道是什么原因吗

### 💻 示例代码

### 🚑 其他信息

![image](https://github.com/ant-design/pro-components/assets/45879273/8f6e19b7-ba2f-49ec-bcb3-c8093fe69b0d)
![image](https://github.com/ant-design/pro-components/assets/45879273/16274fd3-40d4-4c94-841d-abb17bb73843)
![image](https://github.com/ant-design/pro-components/assets/45879273/01bf03ec-a0ee-4cda-8d3b-4bab17c31969)

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the ProForm and EditableProTable renderFormItem path described in the issue, focusing on how the returned input receives validation state. Reproduce the required-field failure with and without renderFormItem, then verify that both inputs display the error state consistently.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.