@jobber/components 4.90.1-JOB-89349.4 → 4.90.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/dist/InputDate/index.js +4 -2
- package/package.json +4 -4
package/dist/InputDate/index.js
CHANGED
|
@@ -32,7 +32,6 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
32
32
|
function InputDate(inputProps) {
|
|
33
33
|
const formFieldActionsRef = React.useRef(null);
|
|
34
34
|
return (React__default["default"].createElement(DatePicker.DatePicker, { selected: inputProps.value, onChange: inputProps.onChange, disabled: inputProps.disabled, readonly: inputProps.readonly, fullWidth: !inputProps.inline, minDate: inputProps.minDate, maxDate: inputProps.maxDate, smartAutofocus: false, activator: activatorProps => {
|
|
35
|
-
var _a;
|
|
36
35
|
const { onChange, onClick, value } = activatorProps;
|
|
37
36
|
const newActivatorProps = omit__default["default"](activatorProps, ["activator"]);
|
|
38
37
|
const [showEmptyPlaceholder, setShowEmptyPlaceholder] = React.useState(!value);
|
|
@@ -45,7 +44,10 @@ function InputDate(inputProps) {
|
|
|
45
44
|
: undefined;
|
|
46
45
|
// Set form field to formatted date string immediately, to avoid validations
|
|
47
46
|
// triggering incorrectly when it blurs (to handle the datepicker UI click)
|
|
48
|
-
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
var _a;
|
|
49
|
+
value && ((_a = formFieldActionsRef.current) === null || _a === void 0 ? void 0 : _a.setValue(value));
|
|
50
|
+
}, [value]);
|
|
49
51
|
return (
|
|
50
52
|
// We prevent the picker from opening on focus for keyboard navigation, so to maintain a good UX for mouse users we want to open the picker on click
|
|
51
53
|
React__default["default"].createElement("div", { onClick: onClick },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "4.90.1
|
|
3
|
+
"version": "4.90.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"dist/*"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@jobber/design": "^0.56.
|
|
23
|
-
"@jobber/formatters": "
|
|
22
|
+
"@jobber/design": "^0.56.0",
|
|
23
|
+
"@jobber/formatters": "*",
|
|
24
24
|
"@jobber/hooks": "^2.9.4",
|
|
25
25
|
"@popperjs/core": "^2.0.6",
|
|
26
26
|
"@std-proposal/temporal": "0.0.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"> 1%",
|
|
83
83
|
"IE 10"
|
|
84
84
|
],
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "edcddf3abea15ea87f496beb651ff87803781b7f"
|
|
86
86
|
}
|