MCPcopy Create free account
hub / github.com/react-component/input / focus

Function focus

src/Input.tsx:51–55  ·  view source on GitHub ↗
(option?: InputFocusOptions)

Source from the content-addressed store, hash-verified

49 const holderRef = useRef<HolderRef>(null);
50
51 const focus = (option?: InputFocusOptions) => {
52 if (inputRef.current) {
53 triggerFocus(inputRef.current, option);
54 }
55 };
56
57 // ====================== Value =======================
58 const [value, setValue] = useMergedState(props.defaultValue, {

Callers 1

handleResetFunction · 0.85

Calls 1

triggerFocusFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…