diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx index a2b0c218..0da4ed34 100644 --- a/src/components/ui/input/index.tsx +++ b/src/components/ui/input/index.tsx @@ -9,7 +9,7 @@ type InputProps = { } & React.InputHTMLAttributes; const Input: React.FC = (props: InputProps) => { - const { inputNameSpan, error, isValid, withErrorSpan, ...inputProps } = props; + const { inputNameSpan, error, isValid, withErrorSpan, value, ...inputProps } = props; const hasError = error && error[inputProps.name || '']; return ( @@ -19,7 +19,7 @@ const Input: React.FC = (props: InputProps) => { className={`${styles.input_type_normal} ${ hasError && !isValid ? `${styles.input_type_error}` : '' }`} - value={inputProps.value !== undefined ? String(inputProps.value) : ''} + value={value ? String(value) : ''} {...inputProps} /> {withErrorSpan && {hasError as string}}