-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(menu): resolve dropdown selection issue #3709
fix(menu): resolve dropdown selection issue #3709
Conversation
|
@sohan01fw is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes made to the Changes
Assessment against linked issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (1)
- packages/components/menu/src/use-menu-item.ts (1 hunks)
Additional comments not posted (1)
packages/components/menu/src/use-menu-item.ts (1)
137-137
: LGTM! The change enhances the menu item interactivity.The new implementation of the
data-selectable
attribute ensures that the menu item is selectable only when it is pressed (isPressed
is true) and selectable (isSelectable
is true). This change introduces a dependency on theisPressed
state, effectively modifying the control flow and the conditions under which the menu item is considered selectable.As highlighted in the AI-generated summary, this change potentially improves the user experience in scenarios where the pressed state is significant for the menu item interaction.
Closes #1560
📝 Description
This PR addresses the issue where the dropdown selection functionality is not working on mobile devices as well as in web.
⛳️ Current behavior (updates)
As you can see the figure below the bug is the selection stay at the same place when cursor move out of the menu.
04.09.2024_15.24.15_REC.mp4
🚀 New behavior
As Video below the bug get solved by applying some condition in code
fix.mp4
💣 Is this a breaking change (Yes/No): No
📝 Additional Information
Summary by CodeRabbit
New Features
Bug Fixes
data-selectable
attribute.