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

Function onClick

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

Source from the content-addressed store, hash-verified

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