autofocus works great for focusing the first input on pageload. I am however not seeing a way to achieve the same behavior programmatically after a form submission etc. I've tried setting a ref on the otp and calling focus() on that but it doesn't appear to have the expected effect of emulating what autofocus does.
Relatively new to vue and vuetify so may be missing something simple. Does this functionality already exist?
Proposed solution
Have .focus() emulate the behavior of the autofocus prop or add an additional function that does so.
Problem to solve
autofocus
works great for focusing the first input on pageload. I am however not seeing a way to achieve the same behavior programmatically after a form submission etc. I've tried setting aref
on the otp and callingfocus()
on that but it doesn't appear to have the expected effect of emulating whatautofocus
does.Relatively new to vue and vuetify so may be missing something simple. Does this functionality already exist?
Proposed solution
Have
.focus()
emulate the behavior of theautofocus
prop or add an additional function that does so.