title: How select part of text in a Textfield on onFocus event with material-UI in React?
body: <p>I have a modal form with  material -UI TextField in react app,  I have a default value, es. a file, and i would select only the name of the file no the extension when the element is load....</p>
  
  <p>I did this code  inside the tag TextField:</p>
  
  <pre><code>&lt;textField 
      value={value}
      fullWidth
      autoFocus
      onFocus={event =&gt; {
      event.target.select()}} /&gt;
  </code></pre>
  
  <p>but this will select all text inside the textField.
  <a href="https://i.stack.imgur.com/t2XWg.png" rel="noreferrer"><img src="https://i.stack.imgur.com/t2XWg.png" alt="enter image description here"></a>
  How can I select only a part of the text?
  ex: if i have myfile.doc i would be selected only myfile
  like this
  <a href="https://i.stack.imgur.com/iRoUl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/iRoUl.png" alt="enter image description here"></a></p>
  
  <p>Thanks</p>