fix: refresh field list after duplicating a custom field#98
Merged
ManukMinasyan merged 1 commit into3.xfrom Mar 6, 2026
Merged
fix: refresh field list after duplicating a custom field#98ManukMinasyan merged 1 commit into3.xfrom
ManukMinasyan merged 1 commit into3.xfrom
Conversation
Listen for 'field-created' event in ManagesFields trait and ManageFieldsTable so the UI updates without a page reload. Also rename fieldDeleted() to refreshSection() and use array syntax for #[On] attributes.
There was a problem hiding this comment.
Pull request overview
Improves the Filament/Livewire custom fields management UI so the field list refreshes automatically after duplicating a custom field, avoiding the need for a full page reload.
Changes:
- Listen for the
field-createdLivewire event to refresh the relevant field lists after duplication. - Rename the section refresh handler from
fieldDeleted()torefreshSection()to reflect its broader responsibility. - Replace fully-qualified
CustomFieldOptionSettingsDatausage in a feature test with an import.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/Feature/Admin/Pages/CustomFieldsFieldManagementTest.php | Imports CustomFieldOptionSettingsData and uses it directly when updating option settings in duplication-related tests. |
| src/Livewire/ManageFieldsTable.php | Refreshes the cached field lists when field-created fires (in addition to existing delete/reorder refresh behavior). |
| src/Livewire/Concerns/ManagesFields.php | Refreshes the section when field-created or field-deleted fires, and renames the handler to refreshSection(). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
field-createdevent inManagesFieldstrait andManageFieldsTableso the UI updates without a page reload after duplicatingfieldDeleted()torefreshSection()since it now handles both events#[On]attributes instead of stackingCustomFieldOptionSettingsDatainstead of using FQCNTest plan