Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: persisting opened folders in the location manager after swtiching back for another tab

Ilian Sapundshievda6b83b8ef1b
diff --git a/app/components/LocationManager.tsx b/app/components/LocationManager.tsx
index 446f8f7f1..f8f080c34 100644
--- a/app/components/LocationManager.tsx
+++ b/app/components/LocationManager.tsx
@@ -70,6 +70,7 @@ interface Props {
reduceHeightBy: number;
toggleLocationDialog: () => void;
isLoading: boolean;
+ show: boolean;
}
type SubFolder = {
@@ -124,12 +125,12 @@ const LocationManager = (props: Props) => {
props.moveLocation(result.draggableId, result.destination.index);
};
- const { classes, reduceHeightBy, isLoading } = props;
+ const { classes, reduceHeightBy, isLoading, show } = props;
return (
<div
className={classes.panel}
style={{
- display: 'flex',
+ display: show ? 'flex' : 'none',
flexDirection: 'column'
}}
>
diff --git a/app/components/MobileNavigation.tsx b/app/components/MobileNavigation.tsx
index b937db6c5..4be119fff 100644
--- a/app/components/MobileNavigation.tsx
+++ b/app/components/MobileNavigation.tsx
@@ -215,9 +215,10 @@ const MobileNavigation = (props: Props) => {
</Button>
</Tooltip>
</ButtonGroup>
- {props.isLocationManagerPanelOpened && (
- <LocationManager reduceHeightBy={180} />
- )}
+ <LocationManager
+ reduceHeightBy={180}
+ show={props.isLocationManagerPanelOpened}
+ />
{props.isTagLibraryPanelOpened && <TagLibrary reduceHeightBy={180} />}
{props.isSearchPanelOpened && <StoredSearches reduceHeightBy={120} />}
{props.isHelpFeedbackPanelOpened && (