fix(ui): fix offset check
This commit is contained in:
parent
41537cc77b
commit
08c51a0b4a
1 changed files with 2 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ function getItemStyles(
|
|||
display: "none"
|
||||
}
|
||||
}
|
||||
let { x, y } = currentOffset;
|
||||
let { x } = currentOffset;
|
||||
if (x > maxX) {
|
||||
x = maxX;
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ const CustomDragLayer: FC<Props> = memo(function CustomDragLayer({ maxX, minX, o
|
|||
}))
|
||||
|
||||
useEffect(() => {
|
||||
if (!isDragging || !currentOffset) {
|
||||
if (!isDragging || !currentOffset?.x) {
|
||||
return
|
||||
}
|
||||
onDrag(currentOffset)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue