From e289f98dec1f90bb271cb76c9db64a8b67587a76 Mon Sep 17 00:00:00 2001 From: "Guilherme L. Moraes" Date: Fri, 22 Jan 2021 12:35:53 -0300 Subject: [PATCH] fix(left-nav): updating typed DDSLeftNavMenu --- .../web-components/src/components/masthead/left-nav.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/web-components/src/components/masthead/left-nav.ts b/packages/web-components/src/components/masthead/left-nav.ts index ed51e90f053..caf90c06cfc 100644 --- a/packages/web-components/src/components/masthead/left-nav.ts +++ b/packages/web-components/src/components/masthead/left-nav.ts @@ -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();