@verifiedinc-public/shared-ui-elements 0.13.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/shared-ui-elements.mjs +352 -354
- package/package.json +1 -1
- package/src/components/form/OTPInput.tsx +1 -4
package/package.json
CHANGED
@@ -140,10 +140,6 @@ function OTPInputComponent(
|
|
140
140
|
const valuesString = values.join('');
|
141
141
|
const firstEmptyInput = inputsRef.current[valuesString.length];
|
142
142
|
|
143
|
-
for (const input of inputsRef.current) {
|
144
|
-
input?.blur();
|
145
|
-
}
|
146
|
-
|
147
143
|
firstEmptyInput?.focus();
|
148
144
|
firstEmptyInput?.select();
|
149
145
|
}, [values]);
|
@@ -165,6 +161,7 @@ function OTPInputComponent(
|
|
165
161
|
|
166
162
|
// Calls onChange when all OTP fields are filled.
|
167
163
|
if (newValueString.length === 6) {
|
164
|
+
inputsRef.current.forEach((input) => input?.blur());
|
168
165
|
props.onChange?.({ target: { value: newValueString } });
|
169
166
|
}
|
170
167
|
|