react-component / react-component/field-form

getFieldsValue 废弃掉strict后如何维持原有业务逻辑

Open
#768 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1k
Forks
286
Avg merge
4d 16h
Merged PRs (30d)
1

Description

#761 这个mr将strict废弃,是个break change,会导致getFieldsValue的取值结果发生变化,因为按原来的默认逻辑FormList会把未注册的字段也返回。废弃后我如果升级的话如何保持getFieldsValue的结果与原来一致呢,即FormList包含子项未注册字段数据,但是其余非FormList的只包含注册字段数据,由于我们项目中的表单很多,很多用到了FormList,取数据的时候也是按照List包含全部字段这一特性来做的, 一一排查getFieldsValue的结果是否与预期的一致非常费时间。

Contributor guide

No contributing guide indexed for this repository

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

Read MR #761 first, then trace the getFieldsValue and FormList behavior described in this issue. Compare the pre- and post-strict results, especially for unregistered fields inside FormList, and define the compatibility behavior that would preserve existing applications without changing other fields. The issue does not name a source file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.