Skip to content

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

fix: disabling logic for selecting the global search in some cases

Ilian Sapundshiev734e50596500
diff --git a/app/components/Search.tsx b/app/components/Search.tsx
index 8c5567ae3..347a5d115 100644
--- a/app/components/Search.tsx
+++ b/app/components/Search.tsx
@@ -139,13 +139,14 @@ class Search extends React.Component<Props, State> {
};
static getDerivedStateFromProps(nextProps, prevState) {
- let { searchBoxing } = prevState;
- if (
- Pro &&
- (!nextProps.currentDirectory || nextProps.currentDirectory.length < 1)
- ) {
- searchBoxing = 'global';
- }
+ const { searchBoxing } = prevState;
+ // console.log('Path: ' + nextProps.currentDirectory);
+ // if (
+ // Pro &&
+ // (!nextProps.currentDirectory || nextProps.currentDirectory.length < 1)
+ // ) {
+ // searchBoxing = 'global';
+ // }
if (
prevState.tagsAND.length < 1 &&
nextProps.searchQuery &&