Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 10f026c

Browse files
hansemannnManoj-M-S
andauthoredFeb 26, 2025··
fix: add missing scroll wrapper to Select element (#1856)
Co-authored-by: manoj <manoj.makarasu@gmail.com>
1 parent 4abe279 commit 10f026c

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed
 

‎.changeset/tiny-melons-help.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@strapi/design-system': patch
3+
---
4+
5+
fix: add missing scrollbar to select elements

‎packages/design-system/src/components/Select/SelectParts.tsx

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Flex, FlexComponent } from '../../primitives/Flex';
1010
import { Typography, TypographyComponent, TypographyProps } from '../../primitives/Typography';
1111
import { ANIMATIONS } from '../../styles/motion';
1212
import { inputFocusStyle } from '../../themes';
13+
import { ScrollArea } from '../../utilities/ScrollArea';
1314
import { Field, useField } from '../Field';
1415

1516
/* -------------------------------------------------------------------------------------------------
@@ -196,7 +197,15 @@ const StyledValue = styled(Select.Value)`
196197
* SelectContent
197198
* -----------------------------------------------------------------------------------------------*/
198199

199-
const SelectContent = styled(Select.Content)`
200+
const SelectContent = React.forwardRef<HTMLDivElement, ContentProps>((props, ref) => {
201+
return (
202+
<StyledContent ref={ref} {...props}>
203+
<ScrollArea>{props.children}</ScrollArea>
204+
</StyledContent>
205+
);
206+
});
207+
208+
const StyledContent = styled(Select.Content)`
200209
background: ${({ theme }) => theme.colors.neutral0};
201210
box-shadow: ${({ theme }) => theme.shadows.filterShadow};
202211
border: 1px solid ${({ theme }) => theme.colors.neutral150};

0 commit comments

Comments
 (0)
Please sign in to comment.