title: Autocomplete Set Default Value in React
body: <p>I need to have a default value in my autocomplete in my react app. My problem is when i try to submit it, it still is invalid. Meaning it has no value in it. I need to click the autocomplete and select it again just to make to have the value.</p>
  <p>Pls check this codesandbox link <a href="https://codesandbox.io/s/autocomplete-formik-material-ui-react-gmc7e?file=/src/index.js" rel="nofollow noreferrer">CLICK HERE</a></p>
  <pre><code>          &lt;Autocomplete
              name=&quot;member_status&quot;
              value={values.member_status}
              options={memberStatuses ? memberStatuses : []}
              getOptionLabel={(memberStatus) =&gt; memberStatus.name}
              onChange={(e, value) =&gt; {
                setFieldValue(
                  &quot;member_status&quot;,
                  value !== null ? value.id : &quot;&quot;
                );
              }}
              renderInput={(params) =&gt; (
                &lt;TextField
                  {...params}
                  label=&quot;Member Status&quot;
                  name=&quot;member_status&quot;
                  variant=&quot;outlined&quot;
                  onBlur={handleBlur}
                  helperText={
                    touched.member_status ? errors.member_status : &quot;&quot;
                  }
                  error={
                    touched.member_status &amp;&amp; Boolean(errors.member_status)
                  }
                /&gt;
              )}
            /&gt;
  </code></pre>