@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.cjs.js
CHANGED
|
@@ -10782,10 +10782,10 @@ var useSelect = function useSelect(_ref) {
|
|
|
10782
10782
|
};
|
|
10783
10783
|
}, [handleKeyDown]);
|
|
10784
10784
|
useUpdateEffect(function () {
|
|
10785
|
-
|
|
10785
|
+
dispatch({
|
|
10786
10786
|
type: 'SELECT',
|
|
10787
10787
|
payload: {
|
|
10788
|
-
value: value
|
|
10788
|
+
value: value !== null && value !== void 0 ? value : ''
|
|
10789
10789
|
}
|
|
10790
10790
|
});
|
|
10791
10791
|
}, [value]);
|
|
@@ -10876,6 +10876,13 @@ var Select = function Select(_ref) {
|
|
|
10876
10876
|
return state.focused === option.value;
|
|
10877
10877
|
});
|
|
10878
10878
|
}, [options, state.focused]);
|
|
10879
|
+
React.useEffect(function () {
|
|
10880
|
+
if (disabled && state.mode === Mode.Open) {
|
|
10881
|
+
dispatch({
|
|
10882
|
+
type: 'CLOSE'
|
|
10883
|
+
});
|
|
10884
|
+
}
|
|
10885
|
+
}, [disabled, state.mode, Mode, dispatch]);
|
|
10879
10886
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", _extends$1({
|
|
10880
10887
|
id: idRef && "Select--".concat(idRef),
|
|
10881
10888
|
className: classNames('Select', {
|