mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 10:02:37 +10:00
fix: add cancel button for editing comments (#580)
* fix: add cancel button for editing comments * cleanup --------- Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
This commit is contained in:
@ -58,6 +58,9 @@ function CommentListItem({ comment }: CommentListItemProps) {
|
||||
function handleEditToggle() {
|
||||
setIsEditing(true);
|
||||
}
|
||||
function cancelEdit() {
|
||||
setIsEditing(false);
|
||||
}
|
||||
|
||||
return (
|
||||
<Box ref={ref} pb="xs">
|
||||
@ -115,6 +118,8 @@ function CommentListItem({ comment }: CommentListItemProps) {
|
||||
<CommentActions
|
||||
onSave={handleUpdateComment}
|
||||
isLoading={isLoading}
|
||||
onCancel={cancelEdit}
|
||||
isCommentEditor={true}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user