Skip to content

Commit 702b5b1

Browse files
authored
trim search term to usability of the search (#588)
* trim search term to usability of the search --------- Signed-off-by: jamal-khey <[email protected]>
1 parent 8fbaf47 commit 702b5b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/search/search-bar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ export function SearchBar({ inputRef }: Readonly<SearchBarProps>) {
137137
elementsFound={elementsFound}
138138
getOptionLabel={(element) => element.name}
139139
isOptionEqualToValue={(element1, element2) => element1.id === element2.id}
140-
onSearchTermChange={updateSearchTerm}
140+
onSearchTermChange={(value) => updateSearchTerm(value?.trim())}
141141
onSelectionChange={handleMatchingElement}
142142
renderElement={renderOptionItem}
143143
searchTerm={searchTerm}

0 commit comments

Comments
 (0)