Skip to content

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

Fix-creating-folder-in-Kanban (#1901)

Stanimirace3383d7726
diff --git a/app/components/dialogs/CreateDirectoryDialog.tsx b/app/components/dialogs/CreateDirectoryDialog.tsx
index fa92c0267..60b5e5b37 100644
--- a/app/components/dialogs/CreateDirectoryDialog.tsx
+++ b/app/components/dialogs/CreateDirectoryDialog.tsx
@@ -43,7 +43,7 @@ interface Props {
directoryPath: string,
reflect: boolean
) => Promise<boolean>;
- callback?: () => void;
+ callback?: (newDirPath: string) => void;
reflect?: boolean;
}
@@ -83,7 +83,11 @@ function CreateDirectoryDialog(props: Props) {
);
props
.createDirectory(dirPath, reflect !== undefined ? reflect : true)
- .then(() => props.callback());
+ .then(() => {
+ if (props.callback) {
+ props.callback(dirPath);
+ }
+ });
resetState();
props.onClose();
}