ant-design/ant-design-mobile

Form.List 中的某一项删除后,其他字段也被意外影响了

Open

#5609 aperta il 22 ago 2022

Vedi su GitHub
 (5 commenti) (1 reazione) (0 assegnatari)TypeScript (2313 fork)batch import
bughelp wanted

Metriche repository

Star
 (11.238 star)
Metriche merge PR
 (Merge medio 1g 14h) (9 PR mergiate in 30 g)

Descrizione

Version of antd-mobile

5.22.0

Operating system and its version

Others

Browser and its version

Chrome

Sandbox to reproduce

https://stackblitz.com/edit/react-ts-ufnhw9?file=App.tsx

What happened?

复现方法是:

  1. 打开上面的 demo
  2. 点添加按钮,添加三项内容,并分别输入一些值
  3. 删除第二项
  4. 发现此时第三项的值也异常了

预期行为:

点击删除之后,第三项的值保持不变,仅第二项被删除掉

额外一点补充:

把 Form 上的 preserve={false} 去掉就行为正常了 疑似 rc-field-form 的问题

Relevant log output

No response

Guida contributor