Long press cancelled

When released press before threshold time elapsed or conditionally triggered cancellation

Name

onCancel

Type

Javascript
(event, meta) => void
TypeScript
(
  event: 
  | ReactMouseEvent<Target>
  | ReactTouchEvent<Target>
  | ReactPointerEvent<Target>,
  meta: { context?: Context; reason?: LongPressCallbackReason }
) => void

Default value

undefined

Description

Called when press is released BEFORE threshold time elapses, therefore before long press could occur.

This callback is usually called with reason inside meta param. For possible reason values see here.

Last updated