Shun Miyazawa 4 years ago
parent
commit
68c4a6560d
1 changed files with 4 additions and 2 deletions
  1. 4 2
      packages/app/src/components/Sidebar/PageTree/Item.tsx

+ 4 - 2
packages/app/src/components/Sidebar/PageTree/Item.tsx

@@ -108,9 +108,11 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
   const [{ isDragging }, drag] = useDrag(() => ({
     type: 'PAGE_TREE',
     item: { page },
-    end: () => {
+    end: (item, monitor) => {
       // in order to set d-none to dropped Item
-      setShouldHide(true);
+      if (monitor.getDropResult() != null) {
+        setShouldHide(true);
+      }
     },
     collect: monitor => ({
       isDragging: monitor.isDragging(),