(event: SyntheticEvent<T, InputEvent>)
| 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(); |
nothing calls this directly
no outgoing calls
no test coverage detected