@dreamcommerce/aurora 2.7.2-3 → 2.7.2-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.
@@ -127,16 +127,16 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
127
127
  windowYScroll,
128
128
  windowHeightMinusYOffset
129
129
  ]);
130
- React.useEffect(() => {
131
- console.log('isOpen', isOpen);
132
- }, [isOpen]);
133
130
  React.useEffect(() => {
134
131
  var _a;
132
+ console.log('isOpen', isOpen);
135
133
  if (!(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) || !isOpen)
136
134
  return;
135
+ console.log('IN');
137
136
  const scrollableParent = (_a = utilities$1.UiDomUtils.getFirstScrollableParent(wrapperRef.current)) !== null && _a !== void 0 ? _a : document.body;
138
137
  const handleWindowScroll = () => {
139
- console.log('handleWindowScroll', isOpen);
138
+ if (!isOpen)
139
+ return;
140
140
  if (typeof toggleDropdown === 'function') {
141
141
  toggleDropdown();
142
142
  }
@@ -118,16 +118,16 @@ const Content = ({ headerComponent, headerGoBackText, headerGoBackIcon, children
118
118
  windowYScroll,
119
119
  windowHeightMinusYOffset
120
120
  ]);
121
- useEffect(() => {
122
- console.log('isOpen', isOpen);
123
- }, [isOpen]);
124
121
  useEffect(() => {
125
122
  var _a;
123
+ console.log('isOpen', isOpen);
126
124
  if (!(wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) || !isOpen)
127
125
  return;
126
+ console.log('IN');
128
127
  const scrollableParent = (_a = UiDomUtils.getFirstScrollableParent(wrapperRef.current)) !== null && _a !== void 0 ? _a : document.body;
129
128
  const handleWindowScroll = () => {
130
- console.log('handleWindowScroll', isOpen);
129
+ if (!isOpen)
130
+ return;
131
131
  if (typeof toggleDropdown === 'function') {
132
132
  toggleDropdown();
133
133
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@dreamcommerce/aurora",
3
3
  "packageManager": "yarn@3.2.0",
4
4
  "sideEffects": false,
5
- "version": "2.7.2-3",
5
+ "version": "2.7.2-4",
6
6
  "description": "aurora",
7
7
  "author": "k0ssak",
8
8
  "license": "MIT",