pulls inline code into separate handleClickLink function to deal with closing side panel when navigating away
This commit is contained in:
parent
237bc70758
commit
11702538cb
|
@ -194,6 +194,11 @@
|
||||||
}
|
}
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleClickLink = () => {
|
||||||
|
mobileOpen = false
|
||||||
|
sidePanelStore.actions.close()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||||
|
@ -284,8 +289,7 @@
|
||||||
url={navItem.url}
|
url={navItem.url}
|
||||||
subLinks={navItem.subLinks}
|
subLinks={navItem.subLinks}
|
||||||
internalLink={navItem.internalLink}
|
internalLink={navItem.internalLink}
|
||||||
on:clickLink={(() => (mobileOpen = false),
|
on:clickLink={handleClickLink}
|
||||||
sidePanelStore.actions.close)}
|
|
||||||
leftNav={navigation === "Left"}
|
leftNav={navigation === "Left"}
|
||||||
{mobile}
|
{mobile}
|
||||||
{navStateStore}
|
{navStateStore}
|
||||||
|
|
Loading…
Reference in New Issue