fix: prevented multiple api call while updating comment (#6352)
This commit is contained in:
parent
2018114543
commit
7b3f206f57
1 changed files with 2 additions and 2 deletions
|
|
@ -67,11 +67,11 @@ export const IssueCommentCard: FC<TIssueCommentCard> = observer((props) => {
|
|||
defaultValues: { comment_html: comment?.comment_html },
|
||||
});
|
||||
|
||||
const onEnter = (formData: Partial<TIssueComment>) => {
|
||||
const onEnter = async (formData: Partial<TIssueComment>) => {
|
||||
if (isSubmitting || !comment) return;
|
||||
setIsEditing(false);
|
||||
|
||||
activityOperations.updateComment(comment.id, formData);
|
||||
await activityOperations.updateComment(comment.id, formData);
|
||||
|
||||
editorRef.current?.setEditorValue(formData?.comment_html ?? "<p></p>");
|
||||
showEditorRef.current?.setEditorValue(formData?.comment_html ?? "<p></p>");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue