I have a reference (created with useRef() ) that points to an input field, but when the user presses on "space" once, i get the following in my ref:
<input autocomplete="off" type="search" aria-expanded="false" aria-haspopup="true" placeholder="Unit" title=" " value=" "> Which means that the input field's placeholder doesn't show..
How can i detect if there's just one space entered, and if there is, reset the field to the following? (so that the placeholder shows)
<input autocomplete="off" type="search" aria-expanded="false" aria-haspopup="true" placeholder="Unit" title value>