title: How to use onchange with autocomplete material ui?
body: <p>With the method handleChange is handled OnChange event of the Form Input with Hooks style that set the state off the object.</p>
  
  <p>The handleChange function in turn calls setLocation which updates the location state with the new value.  </p>
  
  <p>To make user data entry easier, I decided to change the city field to an autocomplete, but I failed to capture the value of the autocomplete.
  In the documentation he tells me that I need to pass two arguments but I can't understand very well</p>
  
  <pre><code>function(event: object, value: any) =&gt; void
  event: The event source of the callback
  value: null
  </code></pre>
  
  <p>How can I access the value of the field and put it into my function to insert the data? </p>
  
  <pre><code>        &lt;Autocomplete
          style={{ width: 300 }}
          value={location.City}
          onChange={handleChange}
          options={list.City}
          classes={{
            option: classes.option,
          }}
          autoHighlight
          getOptionLabel={option =&gt; typeof option === 'string' ? option : option.City}
          renderOption={option =&gt; (
            &lt;React.Fragment&gt;
  
              {option.City} -{option.State}
            &lt;/React.Fragment&gt;
          )}
  
           renderInput={params =&gt; (
             &lt;TextField {...params} label="City"  value={location.City}  margin="normal" variant="outlined" style={{ width: 220 }} inputProps={{
               ...params.inputProps,
               autoComplete: 'disabled', // disable autocomplete and autofill
             }}/&gt;
           )}
         /&gt;
  </code></pre>