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

Support debounce and throttling for usePlacesWidget #242

Open
HoangMinhBK opened this issue Dec 10, 2024 · 0 comments
Open

Support debounce and throttling for usePlacesWidget #242

HoangMinhBK opened this issue Dec 10, 2024 · 0 comments

Comments

@HoangMinhBK
Copy link

Currently, usePlaceWidget does not support debounce or throttling, this cause every keystroke or interaction with the input send requests to google map API immediately. I tried some tricky way like manipulating the ref but it does not work.

I also tried usePlacesService (which supports debounce) and code a custom dropdown but it's more complicated and error-prone compared to usePlaceWidget.

I think it is necessary to have debounce option on this, because usePlaceWidget is really simple and convenient to use, and people choose this hook a lot because of its simplicity.
Thank you.

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

1 participant