Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Jan 8, 2022
1 parent 3f99671 commit 976dd19
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,20 @@ function DocSidebarItemCategory({
const {autoCollapseSidebarCategories} = useThemeConfig();
useEffect(() => {
if (
collapsible &&
expandedItem &&
expandedItem !== index &&
autoCollapseSidebarCategories
) {
setCollapsed(true);
}
}, [expandedItem, index, setCollapsed, autoCollapseSidebarCategories]);
}, [
collapsible,
expandedItem,
index,
setCollapsed,
autoCollapseSidebarCategories,
]);

return (
<li
Expand Down

0 comments on commit 976dd19

Please sign in to comment.