field-form icon indicating copy to clipboard operation
field-form copied to clipboard

onValuesChange is not invoked in case we do form.setFieldsValue

Open aliaksandr-sakalou-sonatus opened this issue 1 year ago • 2 comments

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!