title: Material UI Text Field, Current Cursor Position
body: <p>How can I get the current cursor (caret) position in a materialUI text field?</p>
  
  <p><a href="https://material-ui.com/components/text-fields/" rel="noreferrer">https://material-ui.com/components/text-fields/</a></p>
  
  <p>Basically, I have a need to modify the string contents at a particular index (for example, insert a char X between char #3 and char #4).</p>
  
  <p>I understand that using the <code>onChange</code>, <code>onClick</code> and <code>onFocus</code> events will flag that a position change may have taken taken place (ie click mouse, or, say move using left/right arrow buttons, or type something), but then if I have a reference to the text-field object, which method or property would then permit me to determine where the caret is exactly positioned (index value <code>0 .. n-1</code>)?</p>
  
  <p>In <code>jQuery</code>, I think this can be obtained via the <code>selectionStart</code> property, so how exactly is the best way for a MaterialUI textfield?</p>
  
  <p>Many thanks.</p>