@widergy/energy-ui 1.112.0 → 1.112.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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.112.1](https://github.com/widergy/energy-ui/compare/v1.112.0...v1.112.1) (2022-02-21)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * mergin UTMenu useEffect's ([#260](https://github.com/widergy/energy-ui/issues/260)) ([852a727](https://github.com/widergy/energy-ui/commit/852a7277c1bff1195e0a17aa849d07ae00a5c9e1))
7
+
1
8
  # [1.112.0](https://github.com/widergy/energy-ui/compare/v1.111.0...v1.112.0) (2022-02-16)
2
9
 
3
10
 
@@ -95,13 +95,6 @@ var UTMenu = function UTMenu(_ref) {
95
95
  var classes = (0, _react.useMemo)(function () {
96
96
  return (0, _classesUtils.mergeClasses)(themeClasses, classNames);
97
97
  }, [classNames]);
98
- (0, _react.useEffect)(function () {
99
- if (lockScreenEnabled && anchor) (0, _utils.lockScreen)(blockerRef, true);
100
- return function () {
101
- document.body.style.overflow = 'unset';
102
- return lockScreenEnabled && (0, _utils.lockScreen)(blockerRef, false);
103
- };
104
- }, [anchor]);
105
98
 
106
99
  var _useState = (0, _react.useState)(null),
107
100
  _useState2 = _slicedToArray(_useState, 2),
@@ -116,7 +109,11 @@ var UTMenu = function UTMenu(_ref) {
116
109
  (0, _react.useEffect)(function () {
117
110
  var shouldOpen = anchor && (items === null || items === void 0 ? void 0 : items.length) > 0;
118
111
  handleOpenState(shouldOpen);
119
- if (shouldOpen) document.body.style.overflow = 'hidden';
112
+ if (lockScreenEnabled && anchor) (0, _utils.lockScreen)(blockerRef, true);
113
+ return function () {
114
+ document.body.style.overflow = 'unset';
115
+ return lockScreenEnabled && (0, _utils.lockScreen)(blockerRef, false);
116
+ };
120
117
  }, [anchor, items]);
121
118
  var popperModifiers = Object.assign({
122
119
  arrow: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "1.112.0",
3
+ "version": "1.112.1",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",