Skip to content

Commit

Permalink
fix(Select): disable option selection (cherry-pick) (#871)
Browse files Browse the repository at this point in the history
Co-authored-by: Yevhenii Chernovol <[email protected]>
  • Loading branch information
imechoim and imechoim authored Aug 8, 2023
1 parent a7154d7 commit c9f066c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const Select = React.forwardRef<HTMLButtonElement, SelectProps>(function

const handleOptionClick = React.useCallback(
(option?: FlattenOption) => {
if (!option || 'label' in option) {
if (!option || option?.disabled || 'label' in option) {
return;
}

Expand Down

0 comments on commit c9f066c

Please sign in to comment.