Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want to throttle or debounce the fetch call, is it possible to have onSuggestionsFetchRequested not required #838

Open
guillaumearchambault opened this issue Jan 27, 2022 · 3 comments

Comments

@guillaumearchambault
Copy link

If user press many time on keyboard, it calls many fecth to get the data. There is a possibility to throttle or debounce those inputs et fetching only on the lasts input. For this, we need to implement our own fetch function as a callback. Then, this method is unusable.
onSuggestionsFetchRequested.

Is it possible to make it not required ?

@guillaumearchambault
Copy link
Author

Never mind, We need using the hook useCallback wrapping debounce function

@ParkyGames
Copy link

Never mind, We need using the hook useCallback wrapping debounce function

Have you got an example of how you implemented this? I'm currently trying to implement the exact same thing

@mikicastro7
Copy link

@ParkyGames @guillaumearchambault Could you pass the code on how to do this functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants