Skip to content

Commit c4b786c

Browse files
authored
Merge pull request #115 from 10up/develop
Update navigation - 2.1.3
2 parents c82e5c7 + b9a4f50 commit c4b786c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/navigation/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project will be documented in this file, per [the Keep a Changelog standard](http://keepachangelog.com/).
44

5+
## [2.1.3]
6+
- [#92](https://github.com/10up/component-library/pull/92)
7+
- Add `$submenu` reference to `onSubmenuOpen()` and `onSubmenuClose()` callbacks
8+
59
## [2.1.2]
610
- [#89](https://github.com/10up/component-library/pull/89)
711
- Fix hover state opening subnavigation not working when the default nav is selected.

packages/navigation/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@10up/component-navigation",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"author": "10up",
55
"description": "Accessible navigation component.",
66
"main": "dist/index.js",

packages/navigation/src/navigation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ export default class Navigation {
305305
* @callback onSubmenuOpen - optional.
306306
*/
307307
if (this.settings.onSubmenuOpen && typeof this.settings.onSubmenuOpen === 'function') {
308-
this.settings.onSubmenuOpen.call();
308+
this.settings.onSubmenuOpen.call(this, $submenu);
309309
}
310310
}
311311

@@ -337,7 +337,7 @@ export default class Navigation {
337337
* @callback onSubmenuClose - optional.
338338
*/
339339
if (this.settings.onSubmenuClose && typeof this.settings.onSubmenuClose === 'function') {
340-
this.settings.onSubmenuClose.call();
340+
this.settings.onSubmenuClose.call(this, $submenu);
341341
}
342342
}
343343

0 commit comments

Comments
 (0)