Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/giant-impalas-occur.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

chore(FilteredActionList): fix className override
6 changes: 4 additions & 2 deletions packages/react/src/FilteredActionList/FilteredActionList.tsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -348,6 +348,8 @@ export function FilteredActionList({
}
}

const {className: textInputClassName, ...restTextInputProps} = textInputProps || {}

return (
<BoxWithFallback
ref={inputAndListContainerRef}
Expand All@@ -374,8 +376,8 @@ export function FilteredActionList({
aria-describedby={inputDescriptionTextId}
loaderPosition={'leading'}
loading={loading && !loadingType.appearsInBody}
className={clsx(textInputProps?.className, fullScreenOnNarrow && classes.FullScreenTextInput)}
{...textInputProps}
className={clsx(textInputClassName, {[classes.FullScreenTextInput]: fullScreenOnNarrow})}

CopilotAISep 18, 2025

Copy link

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.

Suggested change
className={clsx(textInputClassName,{[classes.FullScreenTextInput]: fullScreenOnNarrow})}
className={clsx(textInputClassName,fullScreenOnNarrow&&classes.FullScreenTextInput)}

Copilot uses AI. Check for mistakes.
{...restTextInputProps}
/>
</StyledHeader>
<VisuallyHidden id={inputDescriptionTextId}>Items will be filtered as you type</VisuallyHidden>
Expand Down
Loading