Skip to content

Commit 946907a

Browse files
authored
fix: S2 DateField horizontal scrolling (#9302)
* fix: S2 DateField horizontal scrolling * fix in correct place * add property
1 parent 84cb12a commit 946907a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/@react-spectrum/s2/src/DateField.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ const segmentContainer = style({
4949
flexShrink: 1,
5050
minWidth: 0,
5151
height: 'full',
52-
overflow: 'hidden',
52+
overflowX: 'auto',
53+
overflowY: 'hidden',
54+
scrollbarWidth: 'none',
5355
display: 'flex',
5456
alignItems: 'center',
5557
textWrap: 'nowrap'
@@ -144,6 +146,7 @@ export const DateField = /*#__PURE__*/ (forwardRef as forwardRefType)(function D
144146
size={size}
145147
styles={style({
146148
...fieldInput(),
149+
textWrap: 'nowrap',
147150
paddingX: 'edge-to-text'
148151
})({size})}>
149152
<DateInputContainer>

packages/@react-spectrum/s2/style/spectrum-theme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ export const style = createTheme({
952952
overscrollBehaviorX: ['auto', 'contain', 'none'] as const,
953953
overscrollBehaviorY: ['auto', 'contain', 'none'] as const,
954954
scrollBehavior: ['auto', 'smooth'] as const,
955+
scrollbarWidth: ['none', 'auto', 'thin'] as const,
955956
order: new ArbitraryProperty<number>('order'),
956957

957958
pointerEvents: ['none', 'auto'] as const,

0 commit comments

Comments
 (0)