MCPcopy Create free account
hub / github.com/dailydotdev/apps / onInput

Function onInput

packages/shared/src/hooks/useInputField.ts:40–50  ·  view source on GitHub ↗
(event: SyntheticEvent<T, InputEvent>)

Source from the content-addressed store, hash-verified

38 const onBlur = () => setFocused(false);
39
40 const onInput = (event: SyntheticEvent<T, InputEvent>): void => {
41 if (valueChanged) {
42 valueChanged(event.currentTarget.value);
43 }
44 const len = event.currentTarget.value.length;
45 if (!hasInput && len) {
46 setHasInput(true);
47 } else if (hasInput && !len) {
48 setHasInput(false);
49 }
50 };
51
52 const focusInput = () => {
53 inputRef.current.focus();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected