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

Function onKeyDown

packages/react-aria/src/steplist/useStepListItem.ts:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 const isSelected = selectedKey === key;
49
50 let onKeyDown = event => {
51 const {key: eventKey} = event;
52
53 if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {
54 event.preventDefault();
55 event.stopPropagation();
56 }
57
58 itemProps.onKeyDown?.(event);
59 };
60
61 return {
62 stepProps: {

Callers

nothing calls this directly

Calls 1

onKeyDownMethod · 0.80

Tested by

no test coverage detected