fix: prevents uncontrolled text field component

This commit is contained in:
Jacob Fletcher
2021-11-30 09:28:07 -05:00
parent 7e2b259816
commit f0fd859347
2 changed files with 2 additions and 2 deletions

View File

@@ -63,7 +63,7 @@ const TextInput: React.FC<TextInputProps> = (props) => {
required={required}
/>
<input
value={value}
value={value || ''}
onChange={onChange}
disabled={readOnly}
placeholder={placeholder}

View File

@@ -64,7 +64,7 @@ const TextareaInput: React.FC<TextAreaInputProps> = (props) => {
required={required}
/>
<textarea
value={value as string || ''}
value={value || ''}
onChange={onChange}
disabled={readOnly}
placeholder={placeholder}