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(Form): resolve async validation in yup & issue directly mutate state #2701

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

rdjanuar
Copy link
Collaborator

πŸ”— Linked issue

Resolves #2691

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@rdjanuar rdjanuar requested a review from romhml November 20, 2024 01:59
@@ -87,7 +89,7 @@ export default defineComponent({
if (errors) {
errs = errs.concat(errors)
} else {
Object.assign(props.state, result)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@romhml I think we shouldn't mutate the state data directly because when we use transformation methods like .transform((v) => v.toUpperCase()), it automatically changes the input value displayed to the user. Instead, the transform method should only modify the return value while preserving the original state

Copy link

Deploying ui3 with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: c06b4db
Status:🚫  Build failed.

View logs

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

Successfully merging this pull request may close these issues.

v2.19.2 @nuxt/ui breaks async form validation with yup
1 participant