Skip to content

Conversation

rdjanuar
Copy link
Contributor

@rdjanuar rdjanuar commented Aug 29, 2025

πŸ”— Linked issue

Resolves #4455

❓ 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.

@github-actions github-actions bot added the v3 #1289 label Aug 29, 2025
Copy link

pkg-pr-new bot commented Aug 29, 2025

npm i https://pkg.pr.new/@nuxt/ui@4843

commit: 5cc82a8

@benjamincanac benjamincanac requested a review from romhml August 31, 2025 10:09
@romhml
Copy link
Member

romhml commented Sep 9, 2025

@rdjanuar do you mind explaining the changes? And possibly add some tests to prevent regressions?

@rdjanuar
Copy link
Contributor Author

Okay @romhml, Here's a quick breakdown of the fix:

  • My changes do two main things. First, I made the validation faster on big forms by switching from an array lookup
    (names.some()) to using a Set, which is much more efficient.
  • Second, I fixed a tricky race condition where an error could reappear right after being cleared. I changed the
    order of operations to call await getErrors() first. This gives the clear() function time to finish its job before
    the validation continues, which stops the cleared error from coming back.

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

Successfully merging this pull request may close these issues.

SetErrors with a ref and clear this error from a watcher don't work + TS Error
2 participants