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(InputMenu/SelectMenu): prevent unnecessary updates when modelValue is unchanged #2507

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

ersankarimi
Copy link
Contributor

@ersankarimi ersankarimi commented Oct 31, 2024

πŸ”— Linked issue

Resolves #2445

❓ 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

This change prevents the SelectMenu component from updating unnecessarily when modelValue remains unchanged, improving component efficiency and reducing render load.

Additionally, I’ve created a reproduction case to demonstrate the issue being addressed. You can view it here

πŸ“ Checklist

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

@ersankarimi
Copy link
Contributor Author

Hi there!

I hope this message finds you well. I’d like to update my PR with additional details regarding the changes I've made. I realize that I didn’t provide a comprehensive description initially, and I sincerely apologize for that as this is my first contribution to an open-source project.

I’ve created a reproduction case that demonstrates the issue I aimed to address, which you can find here. This should help clarify the problem and the solution I’ve implemented.

Thank you for your understanding, and I appreciate your feedback!

Prevent unnecessary updates when modelValue is unchanged
@ersankarimi ersankarimi changed the title fix(SelectMenu): prevent unnecessary updates when modelValue is unchanged fix(SelectMenu/InputMenu): prevent unnecessary updates when modelValue is unchanged Nov 4, 2024
@benjamincanac benjamincanac changed the title fix(SelectMenu/InputMenu): prevent unnecessary updates when modelValue is unchanged fix(InputMenu/SelectMenu): prevent unnecessary updates when modelValue is unchanged Nov 5, 2024
@benjamincanac benjamincanac merged commit 1a94b55 into nuxt:dev Nov 5, 2024
2 checks passed
ineshbose added a commit to ineshbose/nuxt-ui that referenced this pull request Nov 5, 2024
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.

USelectMenu Component Triggers Change Event Even When Value Remains Unchanged
3 participants