Skip to content

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

fix sidecar tags in list perspective

sytolk073655da83e5
diff --git a/app/perspectives/list/components/MainContainer.tsx b/app/perspectives/list/components/MainContainer.tsx
index 0c5279233..8aff783c4 100644
--- a/app/perspectives/list/components/MainContainer.tsx
+++ b/app/perspectives/list/components/MainContainer.tsx
@@ -50,6 +50,7 @@ import IOActions from '-/reducers/io-actions';
import {
actions as AppActions,
getDirectoryMeta,
+ getEditedEntryPaths,
getLastSelectedEntry,
getSelectedEntries,
isDeleteMultipleEntriesDialogOpened,
@@ -117,6 +118,7 @@ interface Props {
directoryMeta: TS.FileSystemEntryMeta;
setDirectoryMeta: (fsEntryMeta: TS.FileSystemEntryMeta) => void;
searchResultsCount: number;
+ editedEntryPaths: Array<TS.EditedEntryPath>;
}
function getSettings(directoryMeta: TS.FileSystemEntryMeta): TS.FolderSettings {
@@ -249,6 +251,14 @@ function GridPerspective(props: Props) {
}
}, [props.selectedEntries]);
+ useEffect(() => {
+ // HANDLE (ADD/REMOVE sidecar TAGS) IN SEARCH RESULTS
+ if (!firstRender && props.searchResultsCount > -1) {
+ // sortedDirContent.current = GlobalSearch.results;
+ forceUpdate();
+ }
+ }, [props.editedEntryPaths]);
+
useEffect(() => {
if (!firstRender) {
const perspectiveSettings = getSettings(props.directoryMeta);
@@ -929,7 +939,8 @@ function mapStateToProps(state) {
// isDesktopMode: isDesktopMode(state),
isDeleteMultipleEntriesDialogOpened: isDeleteMultipleEntriesDialogOpened(
state
- )
+ ),
+ editedEntryPaths: getEditedEntryPaths(state)
};
}