Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ui): disables form during locale change #8705

Merged
merged 24 commits into from
Jan 10, 2025

Conversation

jacobsfletch
Copy link
Member

@jacobsfletch jacobsfletch commented Oct 14, 2024

Editing fields during a locale change on slow networks can lead to changes being reset when the new form state is returned. This is because the fields receive new values from context when the new locale loads in, which may have occurred after changes were made to the fields. The fix is to subscribe to a new localeIsLoading context which is set immediately after changing locales, and then reset once the new locale loads in. This also removes the misleading @deprecated flag from the useLocale hook itself.

@jacobsfletch jacobsfletch changed the title fix(ui): disables form on locale change fix(ui): disables form during locale change Oct 14, 2024
@denolfe denolfe removed the v3 label Nov 19, 2024
@jacobsfletch jacobsfletch force-pushed the fix/disable-form-on-locale-change branch from 48f704e to 715e5af Compare January 7, 2025 14:34
@jacobsfletch jacobsfletch marked this pull request as ready for review January 7, 2025 14:40
@jacobsfletch jacobsfletch requested a review from denolfe as a code owner January 7, 2025 14:40
@jacobsfletch jacobsfletch merged commit f4596fc into main Jan 10, 2025
67 checks passed
@jacobsfletch jacobsfletch deleted the fix/disable-form-on-locale-change branch January 10, 2025 19:03
Copy link
Contributor

🚀 This is included in version v3.16.0

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

Successfully merging this pull request may close these issues.

3 participants