Skip to content

Commit

Permalink
don’t trim search term
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mxlje committed Jul 20, 2021
1 parent 6fd1f09 commit 5236af3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/autocomplete/autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default ({
)

const onInputValueChange = ({ type, inputValue }) => {
const term = inputValue.trim()
const term = inputValue

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

0 comments on commit 5236af3

Please sign in to comment.