jannikbuschke / formik-antd

Simple declarative bindings for Ant Design and Formik.
https://codesandbox.io/s/github/jannikbuschke/formik-antd-example
MIT License
587 stars 81 forks source link

Precedence Issue #216

Open ogheneovo12 opened 6 months ago

ogheneovo12 commented 6 months ago

https://github.com/jannikbuschke/formik-antd/blob/0fa8125e125031e9e0e673affb4e8822fc18e023/src/input/index.tsx#L54C9-L54C25

Noticed that calling formik.resetForm(), actually resets the formik state, but the input still maintained it's value, after further digging, realized that the spread operator disconnects the input from being formik controlled, as the value from the formik state will always be overwritten by that of the value from the spread, which in my case is always undefined. Moving the spread to the top fixes, before other props specification fixes it.