fix: add updatedActivityId watcher to ActivityMonitor component
- Add updatedActivityId method to watch for changes to activityId property - When activityId is set/updated, automatically hydrate the activity and enable polling - This allows the activity monitor to display content when activityId is bound from parent component - Fixes issue where activity monitor was empty because activity wasn't loaded 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
32929a9fe7
commit
1271e7df2c
1 changed files with 8 additions and 0 deletions
|
|
@ -44,6 +44,14 @@ public function hydrateActivity()
|
|||
$this->activity = Activity::find($this->activityId);
|
||||
}
|
||||
|
||||
public function updatedActivityId($value)
|
||||
{
|
||||
if ($value) {
|
||||
$this->hydrateActivity();
|
||||
$this->isPollingActive = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function polling()
|
||||
{
|
||||
$this->hydrateActivity();
|
||||
|
|
|
|||
Loading…
Reference in a new issue