Skip to content

Commit

Permalink
fix sidebarCollapsible option
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jun 2, 2020
1 parent 1651733 commit a3d7517
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ function DocSidebarItemCategory({
// active categories are always initialized as expanded
// the default (item.collapsed) is only used for non-active categories
const [collapsed, setCollapsed] = useState(() => {
if (!collapsible) {
return false;
}
return isActive ? false : item.collapsed;
});

Expand Down

0 comments on commit a3d7517

Please sign in to comment.