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: Items unique key warning in dropdown menu to avoid rerenders #10925

Merged

Conversation

memoyil
Copy link
Collaborator

@memoyil memoyil commented Nov 7, 2024

image

PR-Codex overview

This PR focuses on enhancing the functionality of the DropdownMenu component by improving click handling and refactoring event handlers for better readability and maintainability.

Detailed summary

  • Introduced handleClick and handleExternalClick functions to manage click events.
  • Replaced inline onClick handlers in MenuItem with the new functions.
  • Added handlePointerDown for toggling the dropdown state.
  • Updated key assignment in MenuItem mapping for better uniqueness.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aptos-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 10:58am
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 10:58am
bridge ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 10:58am
games ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 10:58am
gamification ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 10:58am
uikit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 10:58am
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 10:58am

Copy link

changeset-bot bot commented Nov 7, 2024

⚠️ No Changeset found

Latest commit: 870d2e3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ChefMomota ChefMomota merged commit 4b5d0c5 into develop Nov 13, 2024
20 checks passed
@ChefMomota ChefMomota deleted the feature/fix_unique_key_items_warning_dropdown_menu branch November 13, 2024 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants