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

Function onFocus

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

Source from the content-addressed store, hash-verified

283 };
284
285 let onFocus = (e: FocusEvent<HTMLInputElement>) => {
286 if (state.isFocused) {
287 return;
288 }
289
290 if (props.onFocus) {
291 props.onFocus(e);
292 }
293
294 state.setFocused(true);
295 };
296
297 let valueId = useValueId([
298 state.selectionManager.selectedKeys,

Callers

nothing calls this directly

Calls 2

onFocusMethod · 0.80
setFocusedMethod · 0.65

Tested by

no test coverage detected