fix: properly clear textarea values after file load

Reason behind this change is, because value via children cannot be reset to
undefined, after the textarea was changed by any user input.
master
Katja Lutz 2 years ago
parent c35a017d91
commit decfdf838d

@ -167,14 +167,13 @@ export const TextArea: Component<
<textarea <textarea
autocomplete="off" autocomplete="off"
ref={textareaEl} ref={textareaEl}
value={props.value || ""}
classList={{ classList={{
"textarea h-auto py-2 textarea-bordered leading-normal": true, "textarea h-auto py-2 textarea-bordered leading-normal": true,
"min-h-[150px]": autosizeEnabled(), "min-h-[150px]": autosizeEnabled(),
}} }}
{...rest} {...rest}
> />
{props.value || ""}
</textarea>
</label> </label>
</div> </div>
); );

Loading…
Cancel
Save