|
@@ -6,6 +6,7 @@ import { DevidedPagePath } from '@growi/core/dist/models';
|
|
|
import { pagePathUtils } from '@growi/core/dist/utils';
|
|
import { pagePathUtils } from '@growi/core/dist/utils';
|
|
|
import Sticky from 'react-stickynode';
|
|
import Sticky from 'react-stickynode';
|
|
|
|
|
|
|
|
|
|
+import { usePrintMode } from '~/client/services/use-print-mode';
|
|
|
import LinkedPagePath from '~/models/linked-page-path';
|
|
import LinkedPagePath from '~/models/linked-page-path';
|
|
|
import {
|
|
import {
|
|
|
usePageControlsX, useCurrentProductNavWidth, useSidebarMode,
|
|
usePageControlsX, useCurrentProductNavWidth, useSidebarMode,
|
|
@@ -27,6 +28,8 @@ const { isTrashPage } = pagePathUtils;
|
|
|
export const PagePathNavSticky = (props: PagePathNavLayoutProps): JSX.Element => {
|
|
export const PagePathNavSticky = (props: PagePathNavLayoutProps): JSX.Element => {
|
|
|
const { pagePath } = props;
|
|
const { pagePath } = props;
|
|
|
|
|
|
|
|
|
|
+ const isPrinting = usePrintMode();
|
|
|
|
|
+
|
|
|
const { data: pageControlsX } = usePageControlsX();
|
|
const { data: pageControlsX } = usePageControlsX();
|
|
|
const { data: sidebarWidth } = useCurrentProductNavWidth();
|
|
const { data: sidebarWidth } = useCurrentProductNavWidth();
|
|
|
const { data: sidebarMode } = useSidebarMode();
|
|
const { data: sidebarMode } = useSidebarMode();
|
|
@@ -82,7 +85,7 @@ export const PagePathNavSticky = (props: PagePathNavLayoutProps): JSX.Element =>
|
|
|
// Controlling pointer-events
|
|
// Controlling pointer-events
|
|
|
// 1. disable pointer-events with 'pe-none'
|
|
// 1. disable pointer-events with 'pe-none'
|
|
|
<div ref={pagePathNavRef}>
|
|
<div ref={pagePathNavRef}>
|
|
|
- <Sticky className={`${moduleClass} mb-4`} innerClass="pe-none" innerActiveClass="active mt-1">
|
|
|
|
|
|
|
+ <Sticky className={moduleClass} enabled={!isPrinting} innerClass="pe-none" innerActiveClass="active mt-1">
|
|
|
{({ status }) => {
|
|
{({ status }) => {
|
|
|
const isParentsCollapsed = status === Sticky.STATUS_FIXED;
|
|
const isParentsCollapsed = status === Sticky.STATUS_FIXED;
|
|
|
|
|
|