From 54b6dd6e401682efab3efae3e66311ba08ba8da2 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Tue, 3 Sep 2024 17:30:50 +0300 Subject: [PATCH] Update Input.tsx --- src/react/Input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/react/Input.tsx b/src/react/Input.tsx index 1da36cc3f..d0400b63b 100644 --- a/src/react/Input.tsx +++ b/src/react/Input.tsx @@ -12,7 +12,7 @@ interface Props extends React.ComponentProps<'input'> { export default ({ autoFocus, rootStyles, inputRef, validateInput, defaultValue, ...inputProps }: Props) => { const ref = useRef(null!) const [validationStyle, setValidationStyle] = useState({}) - const [value, setValue] = useState(defaultValue ?? '') + const [value, setValue] = useState(defaultValue ?? props.value ?? '') useEffect(() => { setValue(inputProps.value === '' || inputProps.value ? inputProps.value : value)