fix page popup

This commit is contained in:
Rizky 2024-07-22 11:16:13 +07:00
parent d51bdad679
commit 70965ed3cf
1 changed files with 17 additions and 15 deletions

View File

@ -170,22 +170,24 @@ export const EdPopPage = () => {
select: { id: true }, select: { id: true },
}); });
} else { } else {
await _db.page_folder.update({ if (opt.dropTargetId !== opt.dragSourceId) {
where: { await _db.page_folder.update({
id: opt.dragSourceId as string, where: {
}, id: opt.dragSourceId as string,
data: { },
parent_id: (opt.dropTargetId === "root" || data: {
!opt.dropTargetId parent_id: (opt.dropTargetId === "root" ||
? null !opt.dropTargetId
: opt.dropTargetId) as string, ? null
}, : opt.dropTargetId) as string,
select: { },
id: true, select: {
}, id: true,
}); },
});
reloadPagePicker(p);
}
} }
reloadPagePicker(p);
}} }}
dragPreviewRender={() => <></>} dragPreviewRender={() => <></>}
canDrag={() => true} canDrag={() => true}