🐛 Fix multiple item dragged issue
This commit is contained in:
@@ -59,7 +59,7 @@ export const ItemNode = ({
|
||||
)
|
||||
const onDrag = (position: NodePosition) => {
|
||||
if (!onMouseDown || block.type === LogicBlockType.AB_TEST) return
|
||||
onMouseDown(position, { ...item, type: block.type })
|
||||
onMouseDown(position, { ...item, type: block.type, blockId: block.id })
|
||||
}
|
||||
useDragDistance({
|
||||
ref: itemRef,
|
||||
|
||||
@@ -159,7 +159,7 @@ export const ItemNodesList = ({
|
||||
/>
|
||||
)}
|
||||
|
||||
{draggedItem && (
|
||||
{draggedItem && draggedItem.blockId === block.id && (
|
||||
<Portal>
|
||||
<Flex
|
||||
pointerEvents="none"
|
||||
|
||||
Reference in New Issue
Block a user