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

USelectMenu Component Triggers Change Event Even When Value Remains Unchanged #2445

Closed
WuChenDi opened this issue Oct 24, 2024 · 2 comments · Fixed by #2507
Closed

USelectMenu Component Triggers Change Event Even When Value Remains Unchanged #2445

WuChenDi opened this issue Oct 24, 2024 · 2 comments · Fixed by #2507
Labels
bug Something isn't working

Comments

@WuChenDi
Copy link

Environment


  • Operating System: Linux
  • Node Version: v20.14.0
  • Nuxt Version: 3.13.2
  • CLI Version: 3.15.0
  • Nitro Version: 2.9.7
  • Package Manager: npm@10.7.0
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxt/ui@2.18.7
  • Build Modules: -

Version

2.18.7

Reproduction

https://github.com/cdLab996/nuxt-ui-example

Description

Hello everyone, I apologize for the interruption.

I've noticed an issue while using the USelectMenu component. When the change event is bound, it gets triggered even if the currently selected value hasn't changed from the previous selection. To observe this behavior more clearly, you can use a watch for comparison.

In general understanding, the change event should only be triggered when the selected value actually changes. If there's no change in value, the change event shouldn't be triggered.

So, I'm wondering, does this qualify as a problem with the component?

Image

Additional context

No response

Logs

No response

@WuChenDi WuChenDi added bug Something isn't working triage labels Oct 24, 2024
@fidlyqm
Copy link

fidlyqm commented Oct 29, 2024

yeah I faced the same issue too

@ersankarimi
Copy link
Contributor

Hello, I’ve submitted a pull request to resolve this issue #2507.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants