[Livewire] Refresh navigation dropdown when teams/profile forms save#132
[Livewire] Refresh navigation dropdown when teams/profile forms save#132taylorotwell merged 1 commit intolaravel:1.xfrom calebporzio:refresh-navigation-dropdown
Conversation
|
@calebporzio I like it...and had considered suggesting that one might experience the same "issue" when changing the user's profile photo. I agree that it's not really a bug...but it would definitely be nice to have, I think. Regarding your solution (I've only read the PR Overview bullets), I have only one complaint...the name of the event implies that it knows what needs to be done. I think it would be nicer to name it something like Whatever the case, I think the event(s) should say what has happened vs what needs to happen. Thoughts...? |
Yeah... I totally agree. |
|
Happy for the PR's functionality.... 👍 Not so crazy about the event name.... 👎 |
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.appto its own dedicated Livewire component (NavigationDropdown)refresh-navigation-dropdownevent to be emitted by other Livewire components and do a simple re-render when one occursrefresh-navigation-dropdownevent from both the profile and team name form componentsBreaking Changes:
This PR's changes are completely compatible with existing published stubs.