From ff336628f802b559837f9de580f052d2a61d3d18 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 2 Apr 2024 17:45:14 +0800 Subject: [PATCH] Fix media description not recognized if programmatically entered --- src/components/compose.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index 4693fd8a..f8d9938a 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -1711,6 +1711,9 @@ function MediaAttachment({ onDescriptionChange, 250, ); + useEffect(() => { + debouncedOnDescriptionChange(description); + }, [description, debouncedOnDescriptionChange]); const [showModal, setShowModal] = useState(false); const textareaRef = useRef(null); @@ -1759,7 +1762,7 @@ function MediaAttachment({ onInput={(e) => { const { value } = e.target; setDescription(value); - debouncedOnDescriptionChange(value); + // debouncedOnDescriptionChange(value); }} > )}