Skip to content

Commit

Permalink
Allow using comma to seperate searchterms (from autocomplete)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhiramTadepalli committed Jan 27, 2025
1 parent e7dc028 commit f1fe2bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/search/SearchBar/searchBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ const SearchBar = ({
const value = (event.target as HTMLInputElement).value;
// if the last character in the new string is a space, check for autocomplete
if (
value[value.length - 1] === ' ' &&
(value[value.length - 1] === ' ' ||
value[value.length - 1] === ',') &&
// but if the user is deleting text, don't try to autocomplete
(event.nativeEvent as InputEvent).inputType === 'insertText'
) {
Expand Down

0 comments on commit f1fe2bb

Please sign in to comment.