Skip to content

Commit

Permalink
Mount edit panels only when first entering (#4564)
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutPants committed Feb 16, 2024
1 parent 706b612 commit 5b9bdad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export const GalleryPage: React.FC<IProps> = ({ gallery, add }) => {
isVisible={activeTabKey === "gallery-chapter-panel"}
/>
</Tab.Pane>
<Tab.Pane eventKey="gallery-edit-panel">
<Tab.Pane eventKey="gallery-edit-panel" mountOnEnter>
<GalleryEditPanel
isVisible={activeTabKey === "gallery-edit-panel"}
gallery={gallery}
Expand Down
2 changes: 1 addition & 1 deletion ui/v2.5/src/components/Images/ImageDetails/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ const ImagePage: React.FC<IProps> = ({ image }) => {
>
<ImageFileInfoPanel image={image} />
</Tab.Pane>
<Tab.Pane eventKey="image-edit-panel">
<Tab.Pane eventKey="image-edit-panel" mountOnEnter>
<ImageEditPanel
isVisible={activeTabKey === "image-edit-panel"}
image={image}
Expand Down
4 changes: 2 additions & 2 deletions ui/v2.5/src/components/Scenes/SceneDetails/Scene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
queryFindScenesByID,
} from "src/core/StashService";

import { SceneEditPanel } from "./SceneEditPanel";
import { ErrorMessage } from "src/components/Shared/ErrorMessage";
import { LoadingIndicator } from "src/components/Shared/LoadingIndicator";
import { Icon } from "src/components/Shared/Icon";
Expand Down Expand Up @@ -59,7 +60,6 @@ const ExternalPlayerButton = lazyComponent(
const QueueViewer = lazyComponent(() => import("./QueueViewer"));
const SceneMarkersPanel = lazyComponent(() => import("./SceneMarkersPanel"));
const SceneFileInfoPanel = lazyComponent(() => import("./SceneFileInfoPanel"));
const SceneEditPanel = lazyComponent(() => import("./SceneEditPanel"));
const SceneDetailPanel = lazyComponent(() => import("./SceneDetailPanel"));
const SceneMoviePanel = lazyComponent(() => import("./SceneMoviePanel"));
const SceneGalleriesPanel = lazyComponent(
Expand Down Expand Up @@ -479,7 +479,7 @@ const ScenePage: React.FC<IProps> = ({
<Tab.Pane className="file-info-panel" eventKey="scene-file-info-panel">
<SceneFileInfoPanel scene={scene} />
</Tab.Pane>
<Tab.Pane eventKey="scene-edit-panel">
<Tab.Pane eventKey="scene-edit-panel" mountOnEnter>
<SceneEditPanel
isVisible={activeTabKey === "scene-edit-panel"}
scene={scene}
Expand Down

0 comments on commit 5b9bdad

Please sign in to comment.