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

Function onFocus

packages/react-aria/src/combobox/useComboBox.ts:257–267  ·  view source on GitHub ↗
(e: FocusEvent<HTMLInputElement>)

Source from the content-addressed store, hash-verified

255 };
256
257 let onFocus = (e: FocusEvent<HTMLInputElement>) => {
258 if (state.isFocused) {
259 return;
260 }
261
262 if (props.onFocus) {
263 props.onFocus(e);
264 }
265
266 state.setFocused(true);
267 };
268
269 let valueId = useValueId([
270 state.selectionManager.selectedKeys,

Callers

nothing calls this directly

Calls 2

onFocusMethod · 0.80
setFocusedMethod · 0.65

Tested by

no test coverage detected