I am using semantic-ui-react's Form.Input, which wraps the input in two divs.
This means,
<Form.Input type='password' name='password' id='loginPassword'></Form.Input>
is rendered as follows:
<div class='field'>
<div class='ui fluid action left icon input'>
<input type='password' name='password' id='loginPassword' ...>
<button ...>
</div>
</div>
I would like to get the ref for the <input/>
element, so that I can call focus().
- My ref is set to the component when using ref='myRef'
- ReactDOM.findDOMNode returns a DOM ref, but the ref is set to the outer div (with class='field').
How do I get a ref to the <input/>
element?
BTW, I am using redux, although I don't think that matters