kui-complex 0.0.48 → 0.0.50
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/InputPassword/cjs/index.js +1 -9
- package/InputPassword/cjs/index.js.map +1 -1
- package/InputPassword/index.js +1 -9
- package/InputPassword/index.js.map +1 -1
- package/InputPhoneWithForm/cjs/index.js +9 -1
- package/InputPhoneWithForm/cjs/index.js.map +1 -1
- package/InputPhoneWithForm/index.js +10 -2
- package/InputPhoneWithForm/index.js.map +1 -1
- package/InputTextAreaMobile/cjs/index.js +1 -9
- package/InputTextAreaMobile/cjs/index.js.map +1 -1
- package/InputTextAreaMobile/index.js +1 -9
- package/InputTextAreaMobile/index.js.map +1 -1
- package/InputWithController/cjs/index.js +1 -9
- package/InputWithController/cjs/index.js.map +1 -1
- package/InputWithController/index.d.ts +1 -1
- package/InputWithController/index.js +1 -9
- package/InputWithController/index.js.map +1 -1
- package/TestForm/cjs/index.js +10 -10
- package/TestForm/cjs/index.js.map +1 -1
- package/TestForm/index.js +10 -10
- package/TestForm/index.js.map +1 -1
- package/cjs/index.js +10 -10
- package/cjs/index.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +10 -10
- package/index.js.map +1 -1
- package/package.json +1 -1
package/TestForm/cjs/index.js
CHANGED
|
@@ -94,14 +94,6 @@ var InputWithController = react.forwardRef(function (_a, ref) {
|
|
|
94
94
|
inputProps.onChange(e);
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
var forwardedRef = function (elem, field) {
|
|
98
|
-
if (ref) {
|
|
99
|
-
// eslint-disable-next-line no-param-reassign
|
|
100
|
-
// @ts-ignore
|
|
101
|
-
ref.current = elem;
|
|
102
|
-
}
|
|
103
|
-
field.ref(elem);
|
|
104
|
-
};
|
|
105
97
|
var getError = function (fieldState) {
|
|
106
98
|
var _a;
|
|
107
99
|
return typeof error !== "undefined" && String(error).length > 0
|
|
@@ -112,7 +104,7 @@ var InputWithController = react.forwardRef(function (_a, ref) {
|
|
|
112
104
|
var field = _a.field, fieldState = _a.fieldState;
|
|
113
105
|
return (jsxRuntime.jsx(kuiBasic.InputWithAdornments, __assign({ message: getError(fieldState) }, field, inputProps, { onChange: function (e) {
|
|
114
106
|
return handleChange(e, field);
|
|
115
|
-
}, value: typeof value !== "undefined" ? value : field.value || "",
|
|
107
|
+
}, value: typeof value !== "undefined" ? value : field.value || "", inputRef: ref })));
|
|
116
108
|
} }));
|
|
117
109
|
});
|
|
118
110
|
|
|
@@ -575,9 +567,17 @@ var InputPhoneWithForm = react.forwardRef(function (props, ref) {
|
|
|
575
567
|
}
|
|
576
568
|
phoneRegister.field.ref(elem);
|
|
577
569
|
};
|
|
570
|
+
react.useEffect(function () {
|
|
571
|
+
if (!codeRegister.field.value) {
|
|
572
|
+
codeRegister.field.onChange({
|
|
573
|
+
target: { value: "7", name: "".concat(name, ".phoneCode") },
|
|
574
|
+
type: "change",
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
}, []);
|
|
578
578
|
return (jsxRuntime.jsx(kuiBasic.InputWithCountryDropdown, __assign({ message: errorMessage,
|
|
579
579
|
// @ts-ignore
|
|
580
|
-
hiddenInputProps: __assign(__assign({}, codeRegister.field), hiddenInputProps), onSelectCountry: handleCountryChange }, phoneRegister.field, other, { onChange: handleChange, ref: forwardedRef, autoComplete: "false" })));
|
|
580
|
+
hiddenInputProps: __assign(__assign(__assign({}, codeRegister.field), hiddenInputProps), { value: codeRegister.field.value || "7" }), onSelectCountry: handleCountryChange }, phoneRegister.field, other, { onChange: handleChange, ref: forwardedRef, autoComplete: "false" })));
|
|
581
581
|
});
|
|
582
582
|
InputPhoneWithForm.defaultProps = {
|
|
583
583
|
name: "phone",
|