react-component / react-component/field-form
希望能在registerWatch的回调函数中带出触发值改变的triggerName
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 286
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 1
Description
作为antd的深度使用者, 经常会用到这些内部的hooks
shouldUpdate和notifyWatch会在任意表单字段变化时候触发, 在二次封装的时候经常会用到。比如这次实现配置化表单联动,需要知道触发值改变的是 api调用 还是 用户输入, 来实现循环联动的效果
之前通过修改源码实现过一版,但是这种方式毕竟不好,换个项目就用不了了,现在想把这个功能抽成插件,就这点实在是绕不开
而且这个api带出triggerName也很合理,求求了
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating registerWatch, shouldUpdate, and notifyWatch in the TypeScript form code and tracing how callbacks are invoked for user input versus API updates. Done means the callback exposes which trigger caused the change and the behavior is verified for both paths; the issue names no specific files or existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100