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

Function onPressStart

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

Source from the content-addressed store, hash-verified

376 // oxlint-disable-next-line react/react-compiler
377 itemPressProps = mergeProps(itemPressProps, {
378 onPressStart(e) {
379 if (e.pointerType !== 'touch') {
380 manager.setFocused(true);
381 manager.setFocusedKey(key);
382 }
383 },
384 onPress(e) {
385 if (e.pointerType === 'touch') {
386 manager.setFocused(true);

Callers

nothing calls this directly

Calls 2

setFocusedMethod · 0.65
setFocusedKeyMethod · 0.65

Tested by

no test coverage detected