Skip to content

Commit

Permalink
fix(left-nav): updating typed DDSLeftNavMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermelMoraes committed Jan 22, 2021
1 parent 3743090 commit e289f98
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/web-components/src/components/masthead/left-nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,11 @@ class DDSLeftNav extends StableSelectorMixin(BXSideNav) {
if (expanded) {
this._hFocusWrap = focuswrap(this.shadowRoot!, [startSentinelNode, endSentinelNode]);
} else {
this.querySelectorAll('[expanded]').forEach(ddsLeftNavMenu =>
(ddsLeftNavMenu as DDSLeftNavMenu).removeAttribute('expanded')
);
const { selectorNavItemsExpanded } = this.constructor as typeof DDSLeftNav;

this.querySelectorAll(selectorNavItemsExpanded).forEach(ddsLeftNavMenu => {
(ddsLeftNavMenu as DDSLeftNavMenu).expanded = false;
});

if (this._hFocusWrap) {
this._hFocusWrap = this._hFocusWrap.release();
Expand Down

0 comments on commit e289f98

Please sign in to comment.