aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/MessageInput.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-05-04 20:56:59 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commit3d7d213e3ddc5bf4f71d536f31677b768aa3b7c0 (patch)
treeb88a1582b164571284cc0613e223f44b1202cd6f /vnext/src/components/MessageInput.js
parent82780d0de04a534dfbcebfdb0cfece022058a266 (diff)
MessageInput: clear body on submit correctly
react-use-form-state 0.10 feature
Diffstat (limited to 'vnext/src/components/MessageInput.js')
-rw-r--r--vnext/src/components/MessageInput.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/vnext/src/components/MessageInput.js b/vnext/src/components/MessageInput.js
index ef96b3b5..e4988d59 100644
--- a/vnext/src/components/MessageInput.js
+++ b/vnext/src/components/MessageInput.js
@@ -54,8 +54,7 @@ export default function MessageInput({ text, data, rows, children, onSend }) {
to: data.to || {}
});
setAttach('');
- formState.values.body = '';
- textareaRef.current.value = '';
+ formState.clearField('body');
textareaRef.current.style.height = '';
updateFocus();
};