-
Notifications
You must be signed in to change notification settings - Fork 615
fix: update Select to correctly merge classes #6124
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
Conversation
🦋 Changeset detectedLatest commit: 186d6e0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
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.
Pull Request Overview
This patch ensures that consumer-provided className
values are merged with the component’s internal classes instead of being overwritten.
- Destructure
className
from props and merge it withclasses.Select
(andclasses.Disabled
when applicable) viaclsx
. - Move the
{...rest}
spread above theclassName
prop so that incoming props don’t override the merged classes. - Add a changeset for a patch release.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/react/src/Select/Select.tsx | Destructure className , adjust prop spread order, and merge classes via clsx |
.changeset/quiet-sides-slide.md | Add patch-level changeset documenting updated class merging behavior |
Comments suppressed due to low confidence (1)
packages/react/src/Select/Select.tsx:68
- Add tests for rendering the Select component with a custom
className
to ensure classes are merged correctly whenclassName
is provided.
className={clsx(className, classes.Select, disabled && classes.Disabled)}
size-limit report 📦
|
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/380522 |
🔴 golden-jobs completed with status |
This reverts commit ad5e73b.
Closes #6067
Changelog
New
Changed
className
is providedRemoved
Rollout strategy