Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-28 00:27:17 +00:00
co-authored by renee-png
parent b821dd6256
commit 5ddf8f6d78
+4 -7
View File
@@ -389,8 +389,9 @@ export function CaseDocumentsTab({ caseId }: { caseId: string }) {
);
})();
const performMove = async () => {
const dest = moveDest; // "" = root
const performMove = async (destArg?: string) => {
const raw = destArg ?? moveDest;
const dest = raw === "__root__" ? "" : raw; // "" = root
// Move folders
for (const full of selectedFolders) {
const name = full.split("/").pop() || full;
@@ -648,11 +649,7 @@ export function CaseDocumentsTab({ caseId }: { caseId: string }) {
<div className="flex justify-end gap-2 pt-2">
<Button variant="ghost" onClick={() => setMoveOpen(false)}>Cancel</Button>
<Button
onClick={() => {
// SelectItem cannot have empty value; map sentinel back to ""
if (moveDest === "__root__") setMoveDest("");
performMove();
}}
onClick={() => performMove(moveDest)}
disabled={!moveDest}
>
Move