@ballistix.digital/react-components 0.8.1 → 0.8.2
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/index.esm.js +4 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -2694,6 +2694,10 @@ var DateMenuForm = function (props) {
|
|
|
2694
2694
|
}
|
|
2695
2695
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2696
2696
|
}, [state]);
|
|
2697
|
+
// listen to value changes.
|
|
2698
|
+
useEffect(function () {
|
|
2699
|
+
setState(defaultValue !== null && defaultValue !== void 0 ? defaultValue : { startDate: null, endDate: null });
|
|
2700
|
+
}, [defaultValue]);
|
|
2697
2701
|
return (jsxs("div", { className: styles.container, children: [jsxs("div", { className: styles.head, children: [label && (jsx("label", { htmlFor: name, className: styles.label, children: label })), !required && !isRequired && typeof label === 'string' && (jsx("span", { className: styles.hint, children: "Optional" })), required && required({ isRequired: isRequired })] }), jsxs("div", { className: styles.container, "data-cy": inputDataCy, children: [jsx(Datepicker, { inputName: name, inputId: name, i18n: i18n, useRange: size === 'expanded', placeholder: placeholder, asSingle: !isRanged, separator: separator, startFrom: startFrom, displayFormat: displayFormat, disabled: isDisabled, popoverDirection: direction, minDate: minDate, maxDate: maxDate, toggleIcon: icon,
|
|
2698
2702
|
//
|
|
2699
2703
|
value: state,
|