mirror of
https://github.com/outline/outline.git
synced 2026-11-27 16:08:58 +03:00
fix: remove isCollectionDropped
This commit is contained in:
1 parent
9fb1da3d31
commit
00dad5e035
1 file changed
+3
-7
@@ -132,7 +132,7 @@ function CollectionLink({
|
||||
|
||||
// Drop to reorder collection
|
||||
const [
|
||||
{ isCollectionDropping, isDraggingAnotherCollection, isCollectionDropped },
|
||||
{ isCollectionDropping, isDraggingAnotherCollection },
|
||||
dropToReorderCollection,
|
||||
] = useDrop({
|
||||
accept: "collection",
|
||||
@@ -151,7 +151,6 @@ function CollectionLink({
|
||||
collect: (monitor) => ({
|
||||
isCollectionDropping: monitor.isOver(),
|
||||
isDraggingAnotherCollection: monitor.canDrop(),
|
||||
isCollectionDropped: monitor.didDrop(),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -206,14 +205,11 @@ function CollectionLink({
|
||||
expandedStateBeforeDragging.current =
|
||||
expandedStateBeforeDragging.current ?? expanded;
|
||||
setExpanded(false);
|
||||
} else if (
|
||||
isCollectionDropped &&
|
||||
expandedStateBeforeDragging.current !== null
|
||||
) {
|
||||
} else if (expandedStateBeforeDragging.current !== null) {
|
||||
setExpanded(expandedStateBeforeDragging.current);
|
||||
expandedStateBeforeDragging.current = null;
|
||||
}
|
||||
}, [expanded, isCollectionDropped, isDraggingAnyCollection]);
|
||||
}, [expanded, isDraggingAnyCollection]);
|
||||
|
||||
React.useEffect(() => {
|
||||
// If we're viewing a starred document through the starred menu then don't
|
||||
|
||||
Reference in new issue
Block a user