dhre-ui-kit 0.0.327 → 0.0.328
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/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +3 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -718,6 +718,7 @@ declare const _default$4: (props: CustomDocumentPickerProps) => React$1.JSX.Elem
|
|
|
718
718
|
interface IProps$1 {
|
|
719
719
|
length?: number;
|
|
720
720
|
onComplete?: (otp?: string) => void;
|
|
721
|
+
onChangeCallback?: (otp?: string) => void;
|
|
721
722
|
errorMessage?: string;
|
|
722
723
|
testId?: string;
|
|
723
724
|
otpContainerStyle?: ViewStyle;
|
package/lib/index.js
CHANGED
|
@@ -4079,6 +4079,7 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4079
4079
|
({
|
|
4080
4080
|
length = 4,
|
|
4081
4081
|
onComplete,
|
|
4082
|
+
onChangeCallback,
|
|
4082
4083
|
resendOTP,
|
|
4083
4084
|
errorMessage,
|
|
4084
4085
|
testId = "",
|
|
@@ -4213,6 +4214,8 @@ const OTPInput = React__default["default"].forwardRef(
|
|
|
4213
4214
|
React.useEffect(() => {
|
|
4214
4215
|
if (otp.length === length) {
|
|
4215
4216
|
onComplete?.(otp);
|
|
4217
|
+
} else {
|
|
4218
|
+
onChangeCallback && onChangeCallback?.(otp);
|
|
4216
4219
|
}
|
|
4217
4220
|
}, [otp]);
|
|
4218
4221
|
return /* @__PURE__ */ React__default["default"].createElement(ThemeProvider, null, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: { ...otpContainerStyle }, "data-testid": testId }, /* @__PURE__ */ React__default["default"].createElement(
|