ant-design / ant-design/pro-components

🐛[BUG] `ProFormUploadDragger` does not scroll when using `scrollToFirstError`

Open
#8,992 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述
When an error occurs in `ProFormUploadDragger`, the form does not scroll to the field, even though `scrollToFirstError` is enabled.
Other fields are correctly scrolled to, but `ProFormUploadDragger` is ignored.

### 📷 复现步骤
[CodeSandbox Link](https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-9gsw3r)

1. Scroll to the bottom of the form and click the Submit button.
2. Since file upload is required, an error will occur.
3. The form should scroll to ProFormUploadDragger, but it does not.

### 🏞 期望结果
When an error occurs in `ProFormUploadDragger`, the form should automatically scroll to the field, just like other form components.

### 💻 复现代码

### © 版本信息

- ProComponents 版本: 2.8.4
- umi 版本
- 浏览器环境: Google Chrome 132.0.6834.160(Official Build) (arm64)
- 开发环境: mac OS 15.2

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox reproduction and the ProFormUploadDragger component, then compare its form-field integration with fields that scroll correctly. Reproduce the required-upload error with scrollToFirstError enabled and verify that submitting the form scrolls to ProFormUploadDragger.

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.