You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issues of this repository and believe that this is not a duplicate.
What problem does this feature solve?
Mostly, if field-B depend on field-A, field-B need to know about field-A value, so field-B should be a render props as Field's children. Maybe I write denpendencies={['field-A']} then It should be work. But now Field children of render props only work with shouldupdate, then I need to write a function to compare the pre-value and current value, maybe dependencies should do more work for convenience。Is it designed on purpose? I read field-form code it should be fine. Like dependencies={['gender']} replace shouldUpdate={(prevValues, currentValues) => prevValues.gender !== currentValues.gender} in https://next.ant.design/components/form-cn/#components-form-demo-control-hooks.
What does the proposed API look like?
render props should work with dependencies props
The text was updated successfully, but these errors were encountered:
dependencies is an option but we didn't export to support render props yet is wish more user feedback since API is hard to remove if added. So we provides most flex way api shouldUpdate at the beginning.
But yes, it will come if more developer want this : )
What problem does this feature solve?
Mostly, if field-B depend on field-A, field-B need to know about field-A value, so field-B should be a render props as Field's children. Maybe I write
denpendencies={['field-A']}
then It should be work. But now Field children of render props only work withshouldupdate
, then I need to write a function to compare the pre-value and current value, maybe dependencies should do more work for convenience。Is it designed on purpose? I read field-form code it should be fine. Likedependencies={['gender']}
replaceshouldUpdate={(prevValues, currentValues) => prevValues.gender !== currentValues.gender}
in https://next.ant.design/components/form-cn/#components-form-demo-control-hooks.What does the proposed API look like?
render props should work with dependencies props
The text was updated successfully, but these errors were encountered: