Skip to content

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

Add description to file broken (#1902)

Stanimir1356f4f6a5bf
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsx
index 170e61fe4..fd2e7b863 100644
--- a/app/components/EntryProperties.tsx
+++ b/app/components/EntryProperties.tsx
@@ -298,13 +298,24 @@ function EntryProperties(props: Props) {
}
}, [props.lastThumbnailImageChange]);
- /*useEffect(() => {
- if (props.openedEntry != undefined && currentEntry.current.description) {
- const { current } = fileDescriptionRef;
+ useEffect(() => {
+ if (
+ !firstRender &&
+ props.openedEntry != undefined &&
+ currentEntry.current.description !== props.openedEntry.description
+ ) {
+ // update description
+ currentEntry.current = enhanceOpenedEntry(
+ props.openedEntry,
+ props.tagDelimiter
+ );
+ forceUpdate();
+ // currentEntry.current.description = editDescription.current;
+ /*const { current } = fileDescriptionRef;
if (!current) return;
- current.update(currentEntry.current.description);
+ current.update(currentEntry.current.description);*/
}
- }, [props.openedEntry]);*/
+ }, [props.openedEntry]);
const renameEntry = () => {
if (editName !== undefined) {