title: How can I submit the value of an autocomplete from material ui?
body: <p>I've installed material ui and I'm getting autocomplete options from jsonplaceholder and It works pretty fine and this is my code :</p>
  
  <pre><code>    const [ value, setValue ] = useState([]);
      const [ inputValue, setInputValue ] = useState('');
      useEffect(() =&gt; {
          axios
              .get('https://jsonplaceholder.typicode.com/posts')
              .then((res) =&gt; {
                  setValue(res.data);
              })
              .catch((e) =&gt; {
                  console.log('error happened');
              });
      }, []);
  
              &lt;Autocomplete
                  id="combo-box-demo"
                  options={value}
                  getOptionLabel={(option) =&gt; option.title}
                  style={{ width: 300 }}
                  inputValue={inputValue}
                  onInputChange={(event, newInputValue) =&gt; {
                      setInputValue(newInputValue);
                  }}
                  onSubmit={() =&gt; console.log('hey')}
                  renderInput={(params) =&gt; (
                      &lt;TextField 
                     onSubmit={() =&gt; console.log('hh')}
                     {...params} 
                   label="Combo box" variant="outlined" /&gt;
  
  
  </code></pre>
  
  <p>Now the thing I want to achieve is when user selects an option , I want to console log something . 
  I did try onSubmit on Textfield but it doesn't work .</p>
  
  <p>How can I console log when the users selects an option from autocomplete or presses enter on the textfield ?</p>