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

[Form] 表单首次通过 hook 调用 setFieldsValue 设置值不会触发 onValuesChange #2682

Open
duxphp opened this issue Dec 26, 2023 · 3 comments
Assignees
Labels
💭 discussion we are discussing

Comments

@duxphp
Copy link
Contributor

duxphp commented Dec 26, 2023

tdesign-react 版本

18

重现链接

https://stackblitz.com/edit/react-jfvys7?file=src%2Fdemo.jsx

重现步骤

1、首次通过 setFieldsValue 来设置表单值
2、表单值设置成功
3、未触发onValuesChange事件打印 vvv

期望结果

不管什么时候调用 setFieldsValue 必须要触发 onValuesChange

实际结果

未触发 onValuesChange

框架版本

No response

浏览器版本

No response

系统版本

No response

Node版本

21

补充说明

No response

Copy link
Contributor

👋 @duxphp,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link
Contributor

♥️ 有劳 @ximendatie @cuijinyu @BaoTao1997 @yume316 @honkinglin 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @duxphp

@HaixingOoO HaixingOoO added the 💭 discussion we are discussing label Feb 22, 2024
@HaixingOoO HaixingOoO added the 🐞 bug Something isn't working label Apr 25, 2024
@uyarn
Copy link
Collaborator

uyarn commented Apr 28, 2024

@duxphp 感觉需要onValuesChange实现的完全可以在执行setFieldValues的方法中一并执行 有什么场景需要再触发吗

@HaixingOoO HaixingOoO removed the 🐞 bug Something isn't working label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 discussion we are discussing
Projects
None yet
Development

No branches or pull requests

4 participants