volto-dropdownmenu 2.4.1 → 2.4.2
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
|
@@ -4,10 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [v2.4.2](https://github.com/collective/volto-dropdownmenu/compare/v2.4.1...v2.4.2)
|
|
8
|
+
|
|
9
|
+
> 25 May 2022
|
|
10
|
+
|
|
11
|
+
- feat: added mobile-menu-opend class to body when mobile menu is opened [`659960c`](https://github.com/collective/volto-dropdownmenu/commit/659960c07782af2b0fe7d0686029bfea2ee0bac2)
|
|
12
|
+
|
|
7
13
|
#### [v2.4.1](https://github.com/collective/volto-dropdownmenu/compare/v2.4.0...v2.4.1)
|
|
8
14
|
|
|
9
15
|
> 14 March 2022
|
|
10
16
|
|
|
17
|
+
- Release 2.4.1 [`4fa2990`](https://github.com/collective/volto-dropdownmenu/commit/4fa2990e03ed41d2dddc5f7fecc6b271c2c356f6)
|
|
11
18
|
- chore: added close event on clickableNavigationRoots [`2cc495a`](https://github.com/collective/volto-dropdownmenu/commit/2cc495a7bd8db9dd6fd90dcafcf31ca31a06c2e8)
|
|
12
19
|
|
|
13
20
|
#### [v2.4.0](https://github.com/collective/volto-dropdownmenu/compare/v2.3.0...v2.4.0)
|
package/package.json
CHANGED
|
@@ -88,6 +88,14 @@ const Navigation = ({ pathname, type }) => {
|
|
|
88
88
|
return () => document.body.removeEventListener('click', clickListener);
|
|
89
89
|
}, []);
|
|
90
90
|
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
if (isMobileMenuOpen) {
|
|
93
|
+
document.body.classList.add('mobile-menu-opened'); //to prevent scroll body
|
|
94
|
+
} else {
|
|
95
|
+
document.body.classList.remove('mobile-menu-opened'); //re-enable scroll body
|
|
96
|
+
}
|
|
97
|
+
}, [isMobileMenuOpen]);
|
|
98
|
+
|
|
91
99
|
const toggleMobileMenu = () => {
|
|
92
100
|
setMobileMenuOpen(!isMobileMenuOpen);
|
|
93
101
|
};
|