MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onLongPress

Function onLongPress

packages/react-aria/src/selection/useSelectableItem.ts:427–432  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

425 let {longPressProps} = useLongPress({
426 isDisabled: !longPressEnabled,
427 onLongPress(e) {
428 if (e.pointerType === 'touch') {
429 onSelect(e);
430 manager.setSelectionBehavior('toggle');
431 }
432 }
433 });
434
435 // Prevent native drag and drop on long press if we also select on long press.

Callers

nothing calls this directly

Calls 2

onSelectFunction · 0.85
setSelectionBehaviorMethod · 0.65

Tested by

no test coverage detected