Skip to content

Commit 579f5b7

Browse files
committed
feat: add transition on width in select picker
1 parent e32f9ca commit 579f5b7

File tree

1 file changed

+4
-3
lines changed
  • src/Shared/Components/SelectPicker

1 file changed

+4
-3
lines changed

src/Shared/Components/SelectPicker/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ const getVariantOverrides = <OptionValue>(
7676
},
7777
}),
7878
...(state.menuIsOpen && {
79-
width: '250px',
79+
minWidth: '250px',
80+
maxWidth: '250px',
8081
}),
8182
}),
8283
singleValue: (_, state) => ({
@@ -165,7 +166,7 @@ export const getCommonSelectStyle = <OptionValue, IsMulti extends boolean>({
165166
maxHeight: '120px',
166167
overflow: 'auto',
167168
alignItems: 'safe center',
168-
transition: 'border-color 0.17s, border 0.17s, padding-inline 0.17s',
169+
transition: 'border-color 0.17s, border 0.17s, padding-inline 0.17s, min-width 0.17s',
169170
...(control(base, state) || {}),
170171

171172
'&:hover': {
@@ -208,7 +209,7 @@ export const getCommonSelectStyle = <OptionValue, IsMulti extends boolean>({
208209
flexShrink: '0',
209210
color: 'var(--N600)',
210211
padding: '0',
211-
transition: 'all .2s ease',
212+
transition: `transform .2s ease${variant === SelectPickerVariantType.BORDER_LESS ? ' 0.17s' : ''}`,
212213
transform: state.selectProps.menuIsOpen ? 'rotate(180deg)' : 'rotate(0deg)',
213214
}),
214215
clearIndicator: (base) => ({

0 commit comments

Comments
 (0)