Delay doesn't work #82
Answered
by
clauderic
johnsonthedev
asked this question in
Q&A
-
Hi I tried to add a delay to my sensors but it's not working. Anyone knows why ? Here is the sandbox: https://codesandbox.io/s/fervent-feather-3twfd?file=/src/Sortable.js:1122-1589 const sensors = useSensors(
useSensor(MouseSensor, {
activationConstraint: {
delay: 250
}
}),
useSensor(PointerSensor, {
activationConstraint: {
delay: 250
}
}),
useSensor(KeyboardSensor, {
coordinateGetter: sortableKeyboardCoordinates,
activationConstraint: {
delay: 250
}
}),
useSensor(TouchSensor, {
activationConstraint: {
delay: 250
}
})
); |
Beta Was this translation helpful? Give feedback.
Answered by
clauderic
Feb 7, 2021
Replies: 1 comment 1 reply
-
You should not be using both
or
In either case, the delay seems to work fine for me, try increasing the value of the |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
johnsonthedev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should not be using both
PointerSensor
andTouchSensor
orMouseSensor
at the same time. Valid combinations are:or
In either case, the delay seems to work fine for me, try increasing the value of the
delay
to validate https://codesandbox.io/s/serene-zhukovsky-qiu5x?file=/src/Sortable.js