@moda/om 21.6.2 → 21.6.4
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
CHANGED
|
@@ -10762,10 +10762,10 @@ var useSelect = function useSelect(_ref) {
|
|
|
10762
10762
|
};
|
|
10763
10763
|
}, [handleKeyDown]);
|
|
10764
10764
|
useUpdateEffect(function () {
|
|
10765
|
-
|
|
10765
|
+
dispatch({
|
|
10766
10766
|
type: 'SELECT',
|
|
10767
10767
|
payload: {
|
|
10768
|
-
value: value
|
|
10768
|
+
value: value !== null && value !== void 0 ? value : ''
|
|
10769
10769
|
}
|
|
10770
10770
|
});
|
|
10771
10771
|
}, [value]);
|
|
@@ -10856,6 +10856,13 @@ var Select = function Select(_ref) {
|
|
|
10856
10856
|
return state.focused === option.value;
|
|
10857
10857
|
});
|
|
10858
10858
|
}, [options, state.focused]);
|
|
10859
|
+
useEffect(function () {
|
|
10860
|
+
if (disabled && state.mode === Mode.Open) {
|
|
10861
|
+
dispatch({
|
|
10862
|
+
type: 'CLOSE'
|
|
10863
|
+
});
|
|
10864
|
+
}
|
|
10865
|
+
}, [disabled, state.mode, Mode, dispatch]);
|
|
10859
10866
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
10860
10867
|
id: idRef && "Select--".concat(idRef),
|
|
10861
10868
|
className: classNames('Select', {
|