fix(select): disabled select shouldn't get update by keyboard#2649
Conversation
🦋 Changeset detectedLatest commit: c4558a7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe changes address a bug in 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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@wingkwong is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Actionable comments posted: 0
Review Status
Configuration used: .coderabbit.yaml
Files selected for processing (3)
- .changeset/nervous-geckos-visit.md (1 hunks)
- packages/components/select/tests/select.test.tsx (1 hunks)
- packages/components/select/src/use-select.ts (2 hunks)
Additional comments not posted (3)
.changeset/nervous-geckos-visit.md (1)
1-5: LGTM! The changeset correctly specifies a patch version update and provides a clear description of the fix.packages/components/select/__tests__/select.test.tsx (1)
365-398: The new test case correctly ensures that a disabled select element does not update via keyboard input, adhering to best testing practices.packages/components/select/src/use-select.ts (1)
235-247: > 📝 NOTEThis review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [207-243]
The modifications to the
statevariable initialization and its subsequent augmentation based on the disabled state of the select component are correctly implemented to address the issue described in the PR.
There was a problem hiding this comment.
Actionable comments posted: 0
Review Status
Configuration used: .coderabbit.yaml
Files selected for processing (1)
- packages/components/select/src/use-select.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/components/select/src/use-select.ts
Closes #2345
📝 Description
⛳️ Current behavior (updates)
Currently if you go to [disabled select storybook], click the background, then press tab, then press 'w', the value changes to
Whale.🚀 New behavior
The value shouldn't get updated if it is disabled
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Summary by CodeRabbit