Skip to content

Commit

Permalink
trim search term to usability of the search (#588)
Browse files Browse the repository at this point in the history
* trim search term to usability of the search

---------

Signed-off-by: jamal-khey <[email protected]>
  • Loading branch information
jamal-khey authored Jan 2, 2025
1 parent 8fbaf47 commit 702b5b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/search/search-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export function SearchBar({ inputRef }: Readonly<SearchBarProps>) {
elementsFound={elementsFound}
getOptionLabel={(element) => element.name}
isOptionEqualToValue={(element1, element2) => element1.id === element2.id}
onSearchTermChange={updateSearchTerm}
onSearchTermChange={(value) => updateSearchTerm(value?.trim())}
onSelectionChange={handleMatchingElement}
renderElement={renderOptionItem}
searchTerm={searchTerm}
Expand Down

0 comments on commit 702b5b1

Please sign in to comment.