fix(v2): reset sidebar state on sidebar changes (#3418)

This commit is contained in:
Sébastien Lorber 2020-09-07 15:19:39 +02:00 committed by GitHub
parent 21852948ce
commit 17975950b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -23,7 +23,11 @@ function DocPageContent({currentDocRoute, versionMetadata, children}) {
<div className="d-flex vh-100 overflow-hidden">
{sidebar && (
<div className="vh-100" role="complementary">
<DocSidebar path={currentDocRoute.path} sidebar={sidebar} />
<DocSidebar
key={sidebarName}
path={currentDocRoute.path}
sidebar={sidebar}
/>
</div>
)}
<main className="vh-100 w-100 d-flex flex-column align-items-center overflow-auto p-5">