Skip to content

Commit

Permalink
Select @next: fix onBlur behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
music1353 committed Oct 6, 2023
1 parent cdc1e17 commit 25bf656
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const SearchableSelectInput = forwardRef<
inputValue,
updateInputValue,
onInputChange,
onBlur,
onFocus,
searchableSelectState: { showInput, showPlaceholder, showSelected },
updateSearchableSelectState,
Expand Down Expand Up @@ -116,7 +117,7 @@ export const SearchableSelectInput = forwardRef<
updateMenuOptions(options);
};

const handleInputBlur = () => {
const handleInputBlur = (e: React.FocusEvent<HTMLInputElement, Element>) => {
if (disabled) return;
setIsSelectedClicked(false);

Expand All @@ -132,6 +133,8 @@ export const SearchableSelectInput = forwardRef<
});
}, 100);
}

onBlur?.(e);
};

useEffect(() => {
Expand Down

0 comments on commit 25bf656

Please sign in to comment.