Availity/availity-reactstrap-validation

focus AvInput on load

Closed this issue · 2 comments

is there a way to focus an input on page load, this is what I have tried, focus() exists, but its not focusing ... do I need to force a re-render inside AV??
const inputRef = useRef(null);
useEffect(() => inputRef.current.focus(), [])
<AvInput name={ "foo" } type={ "text" } required getRef={ inputRef } />

:doh: guess I was overthinking it ... thanks!