Skip to content

Commit 5236af3

Browse files
committed
don’t trim search term
trimming the search term makes `uk` and `uk ` the same query, while in fact the space at the end indicates that it is a standalone word (for example because the user wants to search in the united kingdom and not continue typing `ukraine`). This way the server can handle that correctly.
1 parent 6fd1f09 commit 5236af3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/autocomplete/autocomplete.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export default ({
6464
)
6565

6666
const onInputValueChange = ({ type, inputValue }) => {
67-
const term = inputValue.trim()
67+
const term = inputValue
6868

6969
// call user-supplied onChange callback
7070
if (typeof userOnChange === 'function') {

0 commit comments

Comments
 (0)