@aws-amplify/ui-react-native 2.6.1 → 2.6.3
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/Authenticator/hooks/useFieldValues/useFieldValues.js +3 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/lib/Authenticator/hooks/useFieldValues/useFieldValues.js +3 -2
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/src/Authenticator/hooks/useFieldValues/useFieldValues.ts +3 -2
- package/src/version.ts +1 -1
|
@@ -69,14 +69,15 @@ export default function useFieldValues({ componentName, fields = [], handleBlur,
|
|
|
69
69
|
}
|
|
70
70
|
const { name, label, labelHidden, ...rest } = field;
|
|
71
71
|
const onBlur = (event) => {
|
|
72
|
+
const textValue = values[name] || event?.nativeEvent?.text;
|
|
72
73
|
setTouched({ ...touched, [name]: true });
|
|
73
74
|
// call `onBlur` passed as text `field` option
|
|
74
75
|
field.onBlur?.(event);
|
|
75
76
|
// call machine blur handler
|
|
76
|
-
handleBlur({ name, value:
|
|
77
|
+
handleBlur({ name, value: textValue });
|
|
77
78
|
setFieldValidationErrors({
|
|
78
79
|
...fieldValidationErrors,
|
|
79
|
-
[name]: runFieldValidation(field,
|
|
80
|
+
[name]: runFieldValidation(field, textValue, validationErrors),
|
|
80
81
|
});
|
|
81
82
|
};
|
|
82
83
|
const reportChange = (value) => {
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.6.
|
|
1
|
+
export declare const VERSION = "2.6.3";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.6.
|
|
1
|
+
export const VERSION = '2.6.3';
|
|
@@ -71,14 +71,15 @@ function useFieldValues({ componentName, fields = [], handleBlur, handleChange,
|
|
|
71
71
|
}
|
|
72
72
|
const { name, label, labelHidden, ...rest } = field;
|
|
73
73
|
const onBlur = (event) => {
|
|
74
|
+
const textValue = values[name] || event?.nativeEvent?.text;
|
|
74
75
|
setTouched({ ...touched, [name]: true });
|
|
75
76
|
// call `onBlur` passed as text `field` option
|
|
76
77
|
field.onBlur?.(event);
|
|
77
78
|
// call machine blur handler
|
|
78
|
-
handleBlur({ name, value:
|
|
79
|
+
handleBlur({ name, value: textValue });
|
|
79
80
|
setFieldValidationErrors({
|
|
80
81
|
...fieldValidationErrors,
|
|
81
|
-
[name]: (0, utils_2.runFieldValidation)(field,
|
|
82
|
+
[name]: (0, utils_2.runFieldValidation)(field, textValue, validationErrors),
|
|
82
83
|
});
|
|
83
84
|
};
|
|
84
85
|
const reportChange = (value) => {
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react-native",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"react-native-safe-area-context": "^5.2.0"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@aws-amplify/ui": "6.
|
|
34
|
-
"@aws-amplify/ui-react-core": "3.4.
|
|
35
|
-
"@aws-amplify/ui-react-core-notifications": "2.2.
|
|
33
|
+
"@aws-amplify/ui": "6.12.1",
|
|
34
|
+
"@aws-amplify/ui-react-core": "3.4.6",
|
|
35
|
+
"@aws-amplify/ui-react-core-notifications": "2.2.12"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"aws-amplify": "^6.14.3",
|
|
@@ -112,17 +112,18 @@ export default function useFieldValues<FieldType extends TypedField>({
|
|
|
112
112
|
const { name, label, labelHidden, ...rest } = field;
|
|
113
113
|
|
|
114
114
|
const onBlur: TextFieldOnBlur = (event) => {
|
|
115
|
+
const textValue = values[name] || event?.nativeEvent?.text;
|
|
115
116
|
setTouched({ ...touched, [name]: true });
|
|
116
117
|
|
|
117
118
|
// call `onBlur` passed as text `field` option
|
|
118
119
|
field.onBlur?.(event);
|
|
119
120
|
|
|
120
121
|
// call machine blur handler
|
|
121
|
-
handleBlur({ name, value:
|
|
122
|
+
handleBlur({ name, value: textValue });
|
|
122
123
|
|
|
123
124
|
setFieldValidationErrors({
|
|
124
125
|
...fieldValidationErrors,
|
|
125
|
-
[name]: runFieldValidation(field,
|
|
126
|
+
[name]: runFieldValidation(field, textValue, validationErrors),
|
|
126
127
|
});
|
|
127
128
|
};
|
|
128
129
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '2.6.
|
|
1
|
+
export const VERSION = '2.6.3';
|