Skip to content

Commit 3ab18dc

Browse files
committed
fix: refresh field list after duplicating a custom field
Listen for 'field-created' event in ManageCustomFieldSection so the UI updates without a page reload. Rename fieldDeleted() to refreshSection() and use array syntax for #[On] attribute.
1 parent e208f1f commit 3ab18dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Livewire/ManageCustomFieldSection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function fieldWidthUpdated(int|string $fieldId, int $width): void
5151
$this->section->refresh();
5252
}
5353

54-
#[On('field-deleted')]
55-
public function fieldDeleted(): void
54+
#[On(['field-created', 'field-deleted'])]
55+
public function refreshSection(): void
5656
{
5757
$this->section->refresh();
5858
}

0 commit comments

Comments
 (0)