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/bright-dolphins-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

experimental/SelectPanel: Clear action in search input is only visible when there is text to clear
7 changes: 1 addition & 6 deletions src/drafts/SelectPanel2/SelectPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,7 @@ const SelectPanelSearchInput: React.FC<TextInputProps> = ({onChange: propsOnChan
}}
/>
}
sx={
{
/* TODO: uncommenting this breaks keyboard navigation, that's odd */
// '& input:empty + .TextInput-action': {display: 'none'},
}
}
sx={{'&:has(input:placeholder-shown) .TextInput-action': {display: 'none'}}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this was fun! was able to use a new css feature and a really old css feature

onChange={internalOnChange}
{...props}
/>
Expand Down