Profile settings form stays stale after user data loads #2477
Unanswered
epicdventurer900
asked this question in
Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Profile form does not synchronize after the current user loads
Description
The settings profile form initializes its default values from
currentUser. The user query loads asynchronously, so the form can remain empty after the user data arrives. After a profile update, the form can also continue displaying stale values until the page is reloaded.Reproduction
Expected behavior
The profile form should populate when the current user data becomes available and reset to the saved values after a successful update.
Proposed fix
Reset the form when
currentUserchanges, for example with a React effect that callsform.reset()using the current user's name and email. I prepared this change in my fork, but I will wait for maintainer guidance before opening another pull request.Related closed PR: #2476
All reactions