MCPcopy Index your code
hub / github.com/adobe/react-spectrum / onLongPress

Function onLongPress

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

Source from the content-addressed store, hash-verified

414 let {longPressProps} = useLongPress({
415 isDisabled: !longPressEnabled,
416 onLongPress(e) {
417 if (e.pointerType === 'touch') {
418 onSelect(e);
419 manager.setSelectionBehavior('toggle');
420 }
421 }
422 });
423
424 // 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