diff --git a/src/components/Select/Select.tsx b/src/components/Select/Select.tsx index 91f55e4db..841376443 100644 --- a/src/components/Select/Select.tsx +++ b/src/components/Select/Select.tsx @@ -201,7 +201,7 @@ export const Select: FC = React.forwardRef( size === SelectSize.Flex && smallScreenActive, }, { - [styles.selectSmall]: + [styles.selectLarge]: size === SelectSize.Flex && xSmallScreenActive, }, { [styles.selectLarge]: size === SelectSize.Large }, @@ -279,14 +279,6 @@ export const Select: FC = React.forwardRef( ); }; - const onDropdownVisibilityChange = (isVisible: boolean) => { - setDropdownVisibility(isVisible); - setSearchQuery(''); - setOptions( - options.map((option) => ({ ...option, hideOption: false })) - ); - }; - const OptionMenu = ({ options }: { options: SelectOption[] }) => { const filteredOptions = options.filter( (option) => !option.hideOption @@ -373,7 +365,7 @@ export const Select: FC = React.forwardRef( - onDropdownVisibilityChange(isVisible) + setDropdownVisibility(isVisible) } showDropdown={showDropdown} overlay={ diff --git a/src/components/Select/select.module.scss b/src/components/Select/select.module.scss index 5aa7a0166..a2c9c0166 100644 --- a/src/components/Select/select.module.scss +++ b/src/components/Select/select.module.scss @@ -8,7 +8,7 @@ padding: 0; .select-spinner { - margin: 4px auto; + margin: 10px auto; position: relative; } } @@ -81,7 +81,7 @@ .select-menu-empty { color: var(--grey-color-60); - margin: 10px auto; + margin: $space-m; position: relative; }