fix (#416): textarea ref issue

This commit is contained in:
Jun 2021-12-20 16:43:42 +08:00 committed by GitHub
parent 46417785ed
commit 5f85d5976c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ export function Textarea({ ...props }) {
const disabledEnter = (e) => {
if(e.key === "Enter" && e.shiftKey === false){
e.preventDefault();
const $form = getForm($el.current.ref);
const $form = getForm($el.current);
if($form){
$form.dispatchEvent(new Event("submit", { cancelable: true }));
}