Skip to content

Commit

Permalink
throttle: use leading: true
Browse files Browse the repository at this point in the history
  • Loading branch information
mxlje committed Aug 4, 2021
1 parent a510ad4 commit 277f88e
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 @@ -60,7 +60,7 @@ export default ({
}, [autocomplete])

const throttledSearch = useCallback(
throttle(search, throttleWait, { leading: false, trailing: true }),
throttle(search, throttleWait, { leading: true, trailing: true }),
[search]
)

Expand Down

0 comments on commit 277f88e

Please sign in to comment.