react-component / react-component/field-form
onValuesChange is not invoked in case we do form.setFieldsValue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 286
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 1
Description
It is stated in the document https://github.com/react-component/field-form?tab=readme-ov-file#8-setfields-not-trigger-onfieldschange-and-setfieldsvalue-not-trigger-onvalueschange that it doesn't work by design.
Question is what are the options to do that using the current API? What are the best practices.
We need to do save to db on each form value change but that's not possible because onValuesChange is not invoked when some field reset another field (Example: when field A is updated we reset field B).
Thanks in advance!
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 with the README section “SetFields not trigger onFieldsChange and setFieldsValue not trigger onValuesChange” and review the current form API around field resets and value changes. Clarify the intended save-on-change behavior and define how programmatic updates should be distinguished from user edits before proposing a documented API approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100