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

Function onPressChange

packages/react-aria/src/menu/useMenuItem.ts:234–237  ·  view source on GitHub ↗
(isPressed: boolean)

Source from the content-addressed store, hash-verified

232
233 let isPressedRef = useRef(false);
234 let onPressChange = (isPressed: boolean) => {
235 pressChangeProp?.(isPressed);
236 isPressedRef.current = isPressed;
237 };
238
239 let interaction = useRef<{pointerType: string; key?: string} | null>(null);
240 let onPressUp = (e: PressEvent) => {

Callers 3

usePressFunction · 0.85
onPressStartFunction · 0.85
onPressEndFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected