aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/MessageInput.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-04-08 11:41:11 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commit38de2a3fa75b50973638417b203368570928e2c5 (patch)
tree17f271694a9b20c65e8a458b36d5f66e1d6733f2 /vnext/src/components/MessageInput.js
parent91c895a7e3a58ea3c3ee69e43cf3db1791d64014 (diff)
Post using hooks
Diffstat (limited to 'vnext/src/components/MessageInput.js')
-rw-r--r--vnext/src/components/MessageInput.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnext/src/components/MessageInput.js b/vnext/src/components/MessageInput.js
index 32c32d8d..5ace3317 100644
--- a/vnext/src/components/MessageInput.js
+++ b/vnext/src/components/MessageInput.js
@@ -10,7 +10,7 @@ import Button from './Button';
import UploadButton from './UploadButton';
-export default function MessageInput({ data, rows, children, onSend }) {
+export default function MessageInput({ text, data, rows, children, onSend }) {
let textareaRef = useRef();
let fileinput = useRef();
@@ -21,6 +21,7 @@ export default function MessageInput({ data, rows, children, onSend }) {
}
};
useEffect(() => {
+ textareaRef.current.value = text;
updateFocus();
}, []);