Skip to content

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

fix: make stored searches scrollable

Ilian Sapundshievdf7feebaeca4
diff --git a/app/components/MobileNavigation.tsx b/app/components/MobileNavigation.tsx
index 814d60591..88046fa6a 100644
--- a/app/components/MobileNavigation.tsx
+++ b/app/components/MobileNavigation.tsx
@@ -214,7 +214,7 @@ const MobileNavigation = (props: Props) => {
<LocationManager reduceHeightBy={180} />
)}
{props.isTagLibraryPanelOpened && <TagLibrary reduceHeightBy={180} />}
- {props.isSearchPanelOpened && <StoredSearches />}
+ {props.isSearchPanelOpened && <StoredSearches reduceHeightBy={120} />}
{props.isHelpFeedbackPanelOpened && (
<HelpFeedbackPanel
reduceHeightBy={180}
diff --git a/app/components/StoredSearches.tsx b/app/components/StoredSearches.tsx
index 0b00c6b81..4003a77c8 100644
--- a/app/components/StoredSearches.tsx
+++ b/app/components/StoredSearches.tsx
@@ -39,6 +39,7 @@ import { actions as SearchActions, getSearches } from '-/reducers/searches';
import { TS } from '-/tagspaces.namespace';
import SearchMenu from '-/components/menus/SearchMenu';
import { actions as AppActions } from '-/reducers/app';
+import AppConfig from '-/config';
interface Props {
style?: any;
@@ -49,6 +50,7 @@ interface Props {
showUnixHiddenEntries: boolean;
addSearches: (searches: Array<TS.SearchQuery>) => void;
openURLExternally: (url: string) => void;
+ reduceHeightBy: number;
}
const SaveSearchDialog = Pro && Pro.UI ? Pro.UI.SaveSearchDialog : false;
@@ -125,8 +127,19 @@ const StoredSearches = (props: Props) => {
const noSearchesFound = props.searches.length < 1;
+ const { reduceHeightBy } = props;
+
return (
- <>
+ // @ts-ignore
+ <div
+ style={{
+ paddingTop: 0,
+ marginTop: 0,
+ height: 'calc(100% - ' + reduceHeightBy + 'px)',
+ // @ts-ignore
+ overflowY: AppConfig.isFirefox ? 'auto' : 'overlay'
+ }}
+ >
<Grid container direction="row">
<Grid item xs={10} style={{ alignSelf: 'center' }}>
<IconButton
@@ -251,7 +264,7 @@ const StoredSearches = (props: Props) => {
searches={props.searches}
/>
)}
- </>
+ </div>
);
};