Tencent / Tencent/tdesign-react

[From] form.validate 目前不支持自动滚动定位到问题的输入框

Open
#3,258 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💭 discussion
Dominant language
TypeScript
Stars
965
Forks
373
Avg merge
3d 6h
Merged PRs (30d)
17

Description

这个功能解决了什么问题

用户并不想触发submit,只想validate时,无法触发自动滚动

你建议的方案是什么

如果form组件最外层传了scrollToFirstError,validate应该类似submit,也支持自动滚动方法

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the form component's validate and submit entry points, and inspect how the scrollToFirstError prop is handled. The work is done when calling validate directly scrolls to the first invalid input in the same way as submit, without requiring a submit event.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.