Autofocus not working when state and setState is passed from the parent · Issue #441 · devfolioco/react-otp-input · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto focus is not working when i passs the state and setState from the parent component but it works when it is internal to the component.
export default function OTP({ setOtp, otp }) {
// const [otp, setOtp] = useState('')
return (
<OtpInput
value={otp}
> numInputs={4}
inputStyle={'otp_input'}
renderSeparator={-}
renderInput={(props) => <input {...props} />}
/>
)
}
The text was updated successfully, but these errors were encountered: