Skip to content

fix: refresh field list after duplicating a custom field#99

Merged
ManukMinasyan merged 1 commit into2.xfrom
fix/refresh-after-duplicate-2x
Mar 6, 2026
Merged

fix: refresh field list after duplicating a custom field#99
ManukMinasyan merged 1 commit into2.xfrom
fix/refresh-after-duplicate-2x

Conversation

@ManukMinasyan
Copy link
Collaborator

Summary

  • Listen for field-created event in ManageCustomFieldSection so the UI updates without a page reload after duplicating
  • Rename fieldDeleted() to refreshSection() since it now handles both events
  • Use array syntax for #[On] attribute

Backport of #98 for 2.x.

Test plan

  • All 19 related tests pass (duplicate, delete, activate, reorder)
  • Pint clean

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.
Copilot AI review requested due to automatic review settings March 6, 2026 15:46
@ManukMinasyan ManukMinasyan merged commit 96351c4 into 2.x Mar 6, 2026
2 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This is a backport of PR #98 for the 2.x branch that fixes the UI not updating after duplicating a custom field. The ManageCustomFieldSection component now listens for both field-created and field-deleted Livewire events, ensuring the field list refreshes without requiring a page reload.

Changes:

  • Added field-created event listener alongside existing field-deleted listener using Livewire's array syntax #[On(['field-created', 'field-deleted'])]
  • Renamed fieldDeleted() to refreshSection() to better reflect the method's dual-purpose nature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants