mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 14:03:33 +09:00
fix a bug where placement indicator doesn't show
This commit is contained in:
1 parent
92f3120769
commit
4708bfd8de
1 file changed
+3
-1
@@ -12,7 +12,9 @@ export const useSubscribeDragAndDropState = () => {
|
||||
useSubscribe<"dragStart", DragStartPayload>(
|
||||
"dragStart",
|
||||
({ origin, dragItem }) => {
|
||||
setState({ isDragging: true, origin, dragItem });
|
||||
// It's possible that dropTargetChange comes before dragStart.
|
||||
// Sot it's important to spread the current ...state here.
|
||||
setState({ ...state, isDragging: true, origin, dragItem });
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user