Press finished

When press on the element finishes

Name

onFinish

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 on the element is released, which is always AFTER threshold time elapses, therefore after long press occurs and callback is called.

This callback is mutually exclusive with onCancel callback, which means it won't be called if long press was cancelled before being triggered.

In cases when you want to trigger action only after user releases long press instead of instantly after threshold time elapses, use this callback instead of long press callback

Last updated