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

Debounce after 5 seconds #2

Closed
waygou opened this issue Oct 16, 2018 · 4 comments
Closed

Debounce after 5 seconds #2

waygou opened this issue Oct 16, 2018 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@waygou
Copy link

waygou commented Oct 16, 2018

Hi,

Thanks for building this field, it have a lot of potential to be used widely!

Still, I think there is an enhancement that will allow the google places api quota (for free usage) not to be exceeded so fast, in case you can use a debounce option.

Meaning, you should only send the request when the user "stops writing in the field after X seconds".

User starts writing the address.
Then he stops writing.
Field waits 5 seconds.
Then makes the HTTP call.

This would reduce drastically the usage of the HTTP requests to the Google places API.

Thanks,
Bruno

@emilianotisato emilianotisato self-assigned this Oct 16, 2018
@emilianotisato emilianotisato added the enhancement New feature or request label Oct 16, 2018
@emilianotisato
Copy link
Owner

Hello @waygou ,

You are right. You can send me a PR, or wait a few days til I make the change...

Thanks

Emiliano

@waygou
Copy link
Author

waygou commented Oct 18, 2018

Thanks! And no worries, I can wait since I'm working on other parts of my project atm.

Cheers,
Bruno

@emilianotisato
Copy link
Owner

Ok, @waygou ,

Since this package is based on olefirenko/vue-google-autocomplete packages.

I am participating on this discussion. Because at this moment I don't see how can I implement this "delaying" feature...

@waygou
Copy link
Author

waygou commented Oct 22, 2018

I'll check it out too, and come back as soon as I have feedback. We might need to defer the placechanged event to an intermediate event that will watch the input value being changed.

Will try to code it this weekend.

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

No branches or pull requests

2 participants