fix page popup
This commit is contained in:
parent
d51bdad679
commit
70965ed3cf
|
|
@ -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}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue