@jobber/components 4.17.2-install-re.13 → 4.17.2-install-re.14
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.
|
@@ -84,7 +84,10 @@ function InputPhoneNumber(_a) {
|
|
|
84
84
|
var { required } = _a, props = tslib_es6.__rest(_a, ["required"]);
|
|
85
85
|
const { placeholder, validations, pattern = "(***) ***-****" } = props;
|
|
86
86
|
const errorSubject = placeholder || "Phone number";
|
|
87
|
-
const getValues = reactHookForm.useFormContext()
|
|
87
|
+
const { getValues } = reactHookForm.useFormContext() != undefined
|
|
88
|
+
? reactHookForm.useFormContext()
|
|
89
|
+
: // If there isn't a Form Context being provided, get a form for this field.
|
|
90
|
+
reactHookForm.useForm({ mode: "onTouched" });
|
|
88
91
|
return (React__default["default"].createElement(InputMask, { pattern: pattern, strict: false },
|
|
89
92
|
React__default["default"].createElement(FormField.FormField, Object.assign({}, props, { type: "tel", validations: Object.assign(Object.assign({ required: {
|
|
90
93
|
value: Boolean(required),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "4.17.2-install-re.
|
|
3
|
+
"version": "4.17.2-install-re.14+c496cd6c",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"> 1%",
|
|
84
84
|
"IE 10"
|
|
85
85
|
],
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "c496cd6cf7b7965d8763794a5bfe2c04a4a3c76a"
|
|
87
87
|
}
|