Fixes @mention draft changes
This commit is contained in:
parent
fa938e8c7d
commit
e3d9e6b906
3 changed files with 23 additions and 9 deletions
|
@ -369,7 +369,7 @@ export function CompositionArea({
|
|||
const previousConversationId = usePrevious(conversationId, conversationId);
|
||||
useEffect(() => {
|
||||
if (!draftText) {
|
||||
inputApiRef.current?.setText('');
|
||||
inputApiRef.current?.setContents('');
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -377,8 +377,8 @@ export function CompositionArea({
|
|||
return;
|
||||
}
|
||||
|
||||
inputApiRef.current?.setText(draftText, true);
|
||||
}, [conversationId, draftText, previousConversationId]);
|
||||
inputApiRef.current?.setContents(draftText, draftBodyRanges, true);
|
||||
}, [conversationId, draftBodyRanges, draftText, previousConversationId]);
|
||||
|
||||
const handleToggleLarge = useCallback(() => {
|
||||
setLarge(l => !l);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue