Hi! I've got a feature request.
I'm using this component with Apollo graphql. I pass down through the props both initial values for the form (when I need to edit an item) and the loading state of the Apollo mutation. When I submit the form and trigger the mutation, it causes mapPropsToFields to be called again and it results in all field values to be reset.
The ideal solution for me will be the way to only allow mapPropsToFields to be called once, when the component is mounted. It can be a new property that may be false by default, but when true it won't call this method on any props change.
I used https://github.com/jaredpalmer/formik before and it uses a similar approach.
Hi! I've got a feature request. I'm using this component with Apollo graphql. I pass down through the props both initial values for the form (when I need to edit an item) and the loading state of the Apollo mutation. When I submit the form and trigger the mutation, it causes
mapPropsToFields
to be called again and it results in all field values to be reset. The ideal solution for me will be the way to only allowmapPropsToFields
to be called once, when the component is mounted. It can be a new property that may be false by default, but when true it won't call this method on any props change. I used https://github.com/jaredpalmer/formik before and it uses a similar approach.