MCPcopy
hub / github.com/adobe/react-spectrum / onClick

Function onClick

packages/react-aria/test/focus/FocusScope.test.js:842–850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840 function Item(props) {
841 let focusManager = useFocusManager();
842 let onClick = e => {
843 focusManager.focusNext();
844 act(() => {
845 // remove fails to fire blur event in jest-dom
846 e.target.blur();
847 e.target.remove();
848 jest.runAllTimers();
849 });
850 };
851 return <button tabIndex={-1} {...props} onClick={onClick} />;
852 }
853 let focusable = getByTestId('focusable');

Callers

nothing calls this directly

Calls 4

actFunction · 0.85
focusNextMethod · 0.65
removeMethod · 0.65
focusPreviousMethod · 0.65

Tested by

no test coverage detected