@7shifts/sous-chef 2.8.0 → 2.8.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.
@@ -4955,6 +4955,28 @@ function CustomOption(_ref) {
4955
4955
  return React__default.createElement(components.Option, Object.assign({}, props), React__default.createElement(CustomComponent, Object.assign({}, props), children));
4956
4956
  }
4957
4957
 
4958
+ var isScrollingTheSelectMenu = function isScrollingTheSelectMenu(element) {
4959
+ if (!isReactSelectElement(element)) {
4960
+ var _element$children;
4961
+
4962
+ return isReactSelectElement(element === null || element === void 0 ? void 0 : (_element$children = element.children) === null || _element$children === void 0 ? void 0 : _element$children[0]);
4963
+ }
4964
+
4965
+ return true;
4966
+ };
4967
+
4968
+ var isReactSelectElement = function isReactSelectElement(element) {
4969
+ var _element$children2;
4970
+
4971
+ var firstOption = element === null || element === void 0 ? void 0 : (_element$children2 = element.children) === null || _element$children2 === void 0 ? void 0 : _element$children2[0];
4972
+
4973
+ if (!firstOption) {
4974
+ return false;
4975
+ }
4976
+
4977
+ return typeof firstOption.id === 'string' && firstOption.id.includes('react-select');
4978
+ };
4979
+
4958
4980
  var MultiSelectField = function MultiSelectField(_ref) {
4959
4981
  var name = _ref.name,
4960
4982
  inputId = _ref.id,
@@ -5023,10 +5045,7 @@ var MultiSelectField = function MultiSelectField(_ref) {
5023
5045
  return false;
5024
5046
  }
5025
5047
 
5026
- var target = e.target;
5027
- var firstOption = target.children[0];
5028
- var isScrollingTheMenu = firstOption && typeof firstOption.id === 'string' && firstOption.id.includes('react-select');
5029
- return !isScrollingTheMenu;
5048
+ return !isScrollingTheSelectMenu(e.target);
5030
5049
  }
5031
5050
  }));
5032
5051
  };
@@ -5116,10 +5135,7 @@ var SelectField = function SelectField(_ref) {
5116
5135
  return false;
5117
5136
  }
5118
5137
 
5119
- var target = e.target;
5120
- var firstOption = target.children[0];
5121
- var isScrollingTheMenu = firstOption && typeof firstOption.id === 'string' && firstOption.id.includes('react-select');
5122
- return !isScrollingTheMenu;
5138
+ return !isScrollingTheSelectMenu(e.target);
5123
5139
  },
5124
5140
  components: {
5125
5141
  Option: UserCustomOption ? function (props) {