Skip to content

Commit

Permalink
fix(component): select
Browse files Browse the repository at this point in the history
  • Loading branch information
F-star committed Apr 4, 2024
1 parent 0b0bd78 commit 9a084ef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/components/src/components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ export const Select: FC<SelectProps> = ({
const activeLabel =
options.find((option) => option.value === value)?.label ?? '';

const handleChange = (value: ValueType) => {
onSelect && onSelect(value);
const handleChange = (newVal: ValueType) => {
if (onSelect && value != newVal) {
onSelect(newVal);
}
setIsOpen(false);
};

Expand Down

0 comments on commit 9a084ef

Please sign in to comment.