title: withFormik : On initial value change, update props.value
body: <p>Once the initial props changes, the values in the forms need to be updated</p>
  
  <pre><code>export default withFormik({
      mapPropsToValues: (props: Props) =&gt; {
          return (
              {
                  id: props.initialData.id,
                  name: props.initialData.name
              }
          );
      },
      handleSubmit: (values, {  props: Props, setSubmitting }) =&gt; {
        Props.submitHandler(values);
      },
    })(NewDatasourceForm);
  </code></pre>
  
  <p>Here in <code>mapPropsToValues</code> I am able to get the new <code>props</code>, But the values in form not get updated.</p>
  
  <pre><code>const NewDatasourceForm = (props) =&gt; {
  const {
      values,
      touched,
      errors,
      isSubmitting,
      setFieldValue,
      handleSubmit,
      handleChange,
      handleBlur
  } = props;
  
  const _handleSelect = (selectDSChoice) =&gt; {
      try {
          setFieldValue('dataSourceType',  selectDSChoice.value);
      } catch (error) {
          // tslint:disable-next-line:no-console
          console.error(error);
      }
  
  };
  
  return(
    &lt;form className="needs-validation was-validated p-5" onSubmit={handleSubmit}&gt;
  
          &lt;div className="form-group"&gt;
              &lt;label&gt;Name&lt;/label&gt;
              &lt;input
                  className={`form-control`}
                  name="name"
                  type="text" 
                  value={values.name} 
                  onChange={handleChange}
                  onBlur={handleBlur}
              /&gt;
          &lt;/div&gt;
      &lt;/form&gt;
  );
  };
  </code></pre>
  
  <p><a href="https://codesandbox.io/s/k5w5qn94z7" rel="nofollow noreferrer">https://codesandbox.io/s/k5w5qn94z7</a></p>
  
  <p>Thanks for support.</p>