Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Form): fixed setFieldsValue is invalid when prop.name type is array #3279

Merged

Conversation

l123wx
Copy link
Contributor

@l123wx l123wx commented Dec 12, 2024

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

当 FormItem prop.name 是数组时,使用 setFieldsValue 赋值无效

💡 需求背景和解决方案

如果 props.name 是数组,遍历 formMapRef.current.entries(),使用 lodash/isEqual 比较两个数组内容是否一致

📝 更新日志

  • fix(Form): 修复1.9.3版本后多级表单字段使用 setFieldValues 功能异常的问题

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@l123wx l123wx changed the title Fixed array type name set fields value invalid fix(Form): fixed setFieldsValue is invalid when prop.name type is array Dec 12, 2024
Copy link
Contributor

完成

Copy link
Collaborator

@uyarn uyarn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@uyarn uyarn merged commit c7d1b60 into Tencent:develop Dec 12, 2024
7 checks passed
@github-actions github-actions bot mentioned this pull request Dec 19, 2024
15 tasks
@Except10n
Copy link
Contributor

@uyarn
Copy link
Collaborator

uyarn commented Dec 23, 2024

数值键时会有问题 @uyarn

https://stackblitz.com/edit/vitejs-vite-fv3ufe?file=src%2FApp.tsx

这边另起一个issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants