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

Function onPressEnd

packages/react-aria/src/toggle/useToggle.ts:148–158  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

146 setLabelPressed(true);
147 },
148 onPressEnd(e) {
149 // Keyboard interactions are handled directly on the input.
150 if (e.pointerType === 'keyboard' || e.pointerType === 'virtual') {
151 e.continuePropagation();
152 return;
153 }
154
155 onPressEnd?.(e);
156 onPressChange?.(false);
157 setLabelPressed(false);
158 },
159 onPressUp(e) {
160 if (e.pointerType === 'keyboard' || e.pointerType === 'virtual') {
161 e.continuePropagation();

Callers

nothing calls this directly

Calls 2

onPressChangeFunction · 0.85
continuePropagationMethod · 0.65

Tested by

no test coverage detected