Skip to content

Commit

Permalink
refactor(Select): remove focus within disable
Browse files Browse the repository at this point in the history
  • Loading branch information
iapolya committed Feb 12, 2025
1 parent 0098771 commit 0bc4153
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,13 @@ export const Select = React.forwardRef<HTMLButtonElement, SelectProps>(function
onBlurWithin: React.useCallback(
(e: React.FocusEvent) => {
onBlur?.(e);
handleClose();

if (!mobile) {
handleClose();
}
},
[handleClose, onBlur],
[handleClose, mobile, onBlur],
),
isDisabled: mobile,
});

const uniqId = useUniqId();
Expand Down

0 comments on commit 0bc4153

Please sign in to comment.