@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],
@@ -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