-
Notifications
You must be signed in to change notification settings - Fork 646
chore(FilteredActionList): fix className override #6879
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: 04c0627 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 |
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 PR fixes prop handling in the FilteredActionList component to prevent className overrides. The change ensures that the className prop from textInputProps is properly separated and combined with conditional classes, rather than being overridden by the spread operator.
- Destructures
classNamefromtextInputPropsfor explicit handling - Updates the TextInput element to use the separated className and apply conditional styling correctly
- Prevents className override by moving the spread operator after the className prop
| loading={loading && !loadingType.appearsInBody} | ||
| className={clsx(textInputProps?.className, fullScreenOnNarrow && classes.FullScreenTextInput)} | ||
| {...textInputProps} | ||
| className={clsx(textInputClassName, {[classes.FullScreenTextInput]: fullScreenOnNarrow})} |
Copilot
AI
Sep 18, 2025
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.
[nitpick] The conditional object syntax {[classes.FullScreenTextInput]: fullScreenOnNarrow} is less readable than the previous fullScreenOnNarrow && classes.FullScreenTextInput pattern. Consider reverting to the more explicit conditional for better readability.
| className={clsx(textInputClassName, {[classes.FullScreenTextInput]: fullScreenOnNarrow})} | |
| className={clsx(textInputClassName, fullScreenOnNarrow && classes.FullScreenTextInput)} |
|
👋 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! |
Component prop handling improvements:
FilteredActionList.tsx, destructuredclassNamefromtextInputPropsand renamed the remainder torestTextInputPropsfor clearer prop management.TextInputelement to use the separatedtextInputClassNameand conditionally apply theFullScreenTextInputclass, while spreading only the remaining props. This preventsclassNamefrom being overridden and ensures correct class application.