@7shifts/sous-chef 3.48.0 → 3.48.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/index.modern.js
CHANGED
|
@@ -6345,6 +6345,13 @@ var calculateMaxHeight = function calculateMaxHeight(triggerPosition, customMaxH
|
|
|
6345
6345
|
}
|
|
6346
6346
|
return customMaxHeight !== undefined && customMaxHeight < calculatedMaxHeight ? customMaxHeight : calculatedMaxHeight;
|
|
6347
6347
|
};
|
|
6348
|
+
var isScrollingSelectFields = function isScrollingSelectFields(scrollEvent) {
|
|
6349
|
+
var target = scrollEvent.target;
|
|
6350
|
+
var firstChild = target && target.firstChild ? target.firstChild : null;
|
|
6351
|
+
var firstChildId = firstChild ? firstChild.id : '';
|
|
6352
|
+
var isScrollingSelectField = firstChildId === null || firstChildId === void 0 ? void 0 : firstChildId.includes('react-select');
|
|
6353
|
+
return isScrollingSelectField;
|
|
6354
|
+
};
|
|
6348
6355
|
|
|
6349
6356
|
function useOnClickOutsideRole(role, cb) {
|
|
6350
6357
|
React__default.useEffect(function () {
|
|
@@ -6400,7 +6407,7 @@ var PaneOverlay = function PaneOverlay(_ref) {
|
|
|
6400
6407
|
useEffect(function () {
|
|
6401
6408
|
var handleScroll = function handleScroll(e) {
|
|
6402
6409
|
var _paneRef$current;
|
|
6403
|
-
if (e.target !== paneRef.current && !((_paneRef$current = paneRef.current) !== null && _paneRef$current !== void 0 && _paneRef$current.contains(e.target))) {
|
|
6410
|
+
if (e.target !== paneRef.current && !((_paneRef$current = paneRef.current) !== null && _paneRef$current !== void 0 && _paneRef$current.contains(e.target)) && !isScrollingSelectFields(e)) {
|
|
6404
6411
|
onToggleDropdown();
|
|
6405
6412
|
}
|
|
6406
6413
|
};
|