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

希望能在registerWatch的回调函数中带出触发值改变的triggerName #623

Open
FloaJa opened this issue Oct 13, 2023 · 0 comments

Comments

@FloaJa
Copy link

FloaJa commented Oct 13, 2023

作为antd的深度使用者, 经常会用到这些内部的hooks

shouldUpdate和notifyWatch会在任意表单字段变化时候触发, 在二次封装的时候经常会用到。比如这次实现配置化表单联动,需要知道触发值改变的是 api调用 还是 用户输入, 来实现循环联动的效果

之前通过修改源码实现过一版,但是这种方式毕竟不好,换个项目就用不了了,现在想把这个功能抽成插件,就这点实在是绕不开

而且这个api带出triggerName也很合理,求求了

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

No branches or pull requests

1 participant