Replies: 3 comments 15 replies
-
你应该自己处理一下,表单没法知道你哪个字段是需要的。 |
Beta Was this translation helpful? Give feedback.
1 reply
-
值合并的边界条件太多了,你这个属于纯业务逻辑 |
Beta Was this translation helpful? Give feedback.
8 replies
-
你说的这种合并策略存在几个问题:
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
现有策略
type IFormMergeStrategy = 'overwrite' | 'merge' | 'deepMerge' | 'shallowMerge'
在表单编辑场景,通常会先从接口获取数据设置到表单中,然后进行编辑,接口往往会多出一些额外的字段,如创建时间等。
那么在提交表单值时,无意间多了表单额外的 value。有没有考虑一种合并策略,以原 Form 中的 field name 为基准合并。
举例:
Beta Was this translation helpful? Give feedback.
All reactions