[Livewire] Refresh navigation dropdown when teams/profile forms save #132
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.
This is in response to issue #99 (Closes #99)
The Problem:
Potential Solutions:
A) Close this PR and do nothing. This is a minor UI flaw, I wouldn't even call it a bug.
B) Close this PR and instead, force a full page refresh EVERY time one of these fields are updated. This is currently being done when a new profile photo is uploaded: Source code reference
C) Merge this PR. Now saving either of those forms will emit a Livewire event that the dropdown is listening to so it will refresh anytime they are updated.
PR Overview:
layouts.app
to its own dedicated Livewire component (NavigationDropdown
)refresh-navigation-dropdown
event to be emitted by other Livewire components and do a simple re-render when one occursrefresh-navigation-dropdown
event from both the profile and team name form componentsBreaking Changes:
This PR's changes are completely compatible with existing published stubs.