I am trying to set auto focus on input fields in a Formik form using React. What is the standard way of doing this?
My code is below:
<img src="images/barcode-small.png" alt="Barcode Small" />
</td>
<td>
<Field name="barcode1"
type="text"
className="p-inputtext"
autocomplete="off"
style={{ width: 250 }}/>
</td>
I've tried simply adding the autoFocus attribute to the Field but that didn't seem to work. In my dev tools I am getting the following error:
How do I check what is blocking the focus? Thanks