File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed
Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -128,13 +128,7 @@ public function toggleReaction(string $reactionType)
128128 ]);
129129 }
130130
131- // Reload the comment with updated reactions relationship count/data
132- // Livewire might handle this automatically if the comment object is updated,
133- // but explicitly reloading might be necessary depending on how data is passed/managed.
134- $ this ->comment ->load ('reactions ' ); // Or $this->comment->loadCount('reactions');
135-
136- // We might need to explicitly re-render or notify the parent list if counts are displayed there.
137- // $this->dispatch('comment:reactions-updated', commentId: $this->comment->id); // Example dispatch
131+ $ this ->dispatch ('comment:reactions-updated ' );
138132 }
139133
140134 #[Computed]
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ public function comments(): Collection
3131 #[On('comment:saved ' )]
3232 #[On('comment:updated ' )]
3333 #[On('comment:deleted ' )]
34+ #[On('comment:reactions-updated ' )]
3435 public function reloadComments (): void
3536 {
3637 unset($ this ->comments );
You can’t perform that action at this time.
0 commit comments