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

Function onFocus

packages/react-aria/src/selection/useSelectableItem.ts:220–224  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

218 itemProps = {
219 tabIndex: key === manager.focusedKey ? 0 : -1,
220 onFocus(e) {
221 if (getEventTarget(e) === ref.current) {
222 manager.setFocusedKey(key);
223 }
224 }
225 };
226 } else if (isDisabled) {
227 itemProps.onMouseDown = e => {

Callers

nothing calls this directly

Calls 2

getEventTargetFunction · 0.90
setFocusedKeyMethod · 0.65

Tested by

no test coverage detected