Tencent / Tencent/tdesign-react

Form 表单 希望能提供设置单个 FormItem 的能力

Open
#2,091 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

这个功能解决了什么问题

比如说在用户修改了某个字段的情况下,我需要清空另一个字段,如果我使用 setFieldsValue 方法,表单的内容会被全量刷新,体验不够好。

你建议的方案是什么?

提供一个 setFieldValue 方法,接收两个参数,(name: 要修改的字段路径, value: 修改的值)

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 by locating the Form component and its existing setFieldsValue API, then trace how field updates reach individual FormItems. Check the Form tests or examples around field updates and add coverage for a single field path and value. Done means the new API updates only the requested field without refreshing the whole form.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.