elseware-ui 2.31.15 → 2.31.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -17957,6 +17957,7 @@ function CommentThread({
17957
17957
  loading = false,
17958
17958
  components,
17959
17959
  config,
17960
+ updatedComment,
17960
17961
  onEdit,
17961
17962
  onDelete,
17962
17963
  onReport
@@ -18078,6 +18079,12 @@ function CommentThread({
18078
18079
  setComments((prev) => updateComment(prev, commentId, updater));
18079
18080
  setReplyCache((prev) => updateReplyCacheComment(prev, commentId, updater));
18080
18081
  }
18082
+ useEffect(() => {
18083
+ if (!updatedComment) {
18084
+ return;
18085
+ }
18086
+ updateCommentEverywhere(updatedComment.id, () => updatedComment);
18087
+ }, [updatedComment]);
18081
18088
  async function handleReply(parentComment, content) {
18082
18089
  const reply = await dataSource.createComment({
18083
18090
  content,
@@ -18164,9 +18171,9 @@ function CommentThread({
18164
18171
  }
18165
18172
  }
18166
18173
  async function handleEditComment(comment) {
18167
- const updatedComment = await onEdit?.(comment);
18168
- if (updatedComment) {
18169
- updateCommentEverywhere(updatedComment.id, () => updatedComment);
18174
+ const updatedComment2 = await onEdit?.(comment);
18175
+ if (updatedComment2) {
18176
+ updateCommentEverywhere(updatedComment2.id, () => updatedComment2);
18170
18177
  }
18171
18178
  }
18172
18179
  if (loading || isLoadingComments) {