mirror of
https://github.com/outline/outline.git
synced 2026-11-29 08:39:20 +03:00
fix: Auto-hide TOC when window shrinks below mobile breakpoint (#12014)
This commit is contained in:
1 parent
054404d716
commit
fc16d3100a
1 file changed
+6
@@ -125,6 +125,12 @@ function DocumentHeader({
|
||||
const showContents =
|
||||
ui.tocVisible === true || (isShare && ui.tocVisible !== false);
|
||||
|
||||
useEffect(() => {
|
||||
if (isMobile && showContents) {
|
||||
ui.set({ tocVisible: false });
|
||||
}
|
||||
}, [isMobile, showContents, ui]);
|
||||
|
||||
const toc = (
|
||||
<Tooltip
|
||||
content={
|
||||
|
||||
Reference in new issue
Block a user