jannikbuschke / formik-antd

Simple declarative bindings for Ant Design and Formik.

Home Page:https://codesandbox.io/s/github/jannikbuschke/formik-antd-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Precedence Issue

ogheneovo12 opened this issue · comments

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.