Open LordAltair74 opened 4 years ago
hi, You can use code input refs array to focus your conformation code.
for example on calling this._onFulfillFirst
you can add this snippet to focus on next code input:
this.codeInputRef2.current.codeInputRefs[0].focus();
Hi I recently used this package for my project and now I have 2 confirmation code input field and the second one is active. I want to activate the first one when I start the program and then when I filled the first one I want to jump to second one.
this is a part of my code:
`
<CodeInput
ref="codeInputRef1"
className={'border-b'}
codeLength={2}
space={10}
size={13}
inputPosition='center'
activeColor='#BFBFBF'
inactiveColor='#BFBFBF'
codeInputStyle={{
color: '#000000',
fontFamily: "IRANSans(FaNum)",
fontSize: 28,
height: responsiveHeight(5.85),
bottom: responsiveHeight(1.14),
right: 8
}}
onFulfill={(code) => this._onFulfillFirst(code)}
/>