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(DropdownMenu/ContextMenu): correct bindings of checkbox items #2921

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

EvertonWingert
Copy link
Contributor

πŸ”— Linked issue

Resolves #2892

❓ 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 PR fixes the DropdownMenu.CheckboxItem, which now uses the modelValue property instead of :checked and @update:checked. According to the official documentation (https://reka-ui.com/docs/components/dropdown-menu#checkboxitem), the :checked and @update:checked properties are no longer available.

πŸ“ Checklist

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

Copy link

pkg-pr-new bot commented Dec 16, 2024

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

commit: ba9654f

@benjamincanac
Copy link
Member

benjamincanac commented Dec 16, 2024

Thanks for the fix! Would you mind doing the same thing on the ContextMenu in the same PR? 😊

@benjamincanac
Copy link
Member

benjamincanac commented Dec 16, 2024

I'm wondering if we should not use the same syntax as well: :model-value="item.modelValue" @update:model-value="item.onUpdateModelValue". What do you think?

I missed that when migrating to Reka UI but I would have probably renamed it.

@benjamincanac benjamincanac added the v3 #1289 label Dec 16, 2024
@EvertonWingert
Copy link
Contributor Author

I also agree to change it so that it is the same as the renka ui, it will make maintenance easier in the future

@benjamincanac benjamincanac changed the title fix(DropdownMenu): correct checkbox binding in DropdownMenu.CheckboxItem fix(DropdownMenu/ContextMenu)!: use reka-ui syntax for checkbox items Dec 16, 2024
@benjamincanac
Copy link
Member

Can you take care of it or do you want me to do it?

@EvertonWingert
Copy link
Contributor Author

You can do it, I won't have time now to make all the changes and test it

Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

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

Now that I think of it, I'm not really sure we should rename all of this since it only applies to items with type checkbox. Let's merge this for now to fix the issue and figure it out later!

@benjamincanac benjamincanac changed the title fix(DropdownMenu/ContextMenu)!: use reka-ui syntax for checkbox items fix(DropdownMenu/ContextMenu): correct bindings of checkbox items Dec 16, 2024
@benjamincanac benjamincanac merged commit 4c5a4fb into nuxt:v3 Dec 16, 2024
2 checks passed
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.

UDropdownMenu Not Emitting onUpdateChecked
2 participants