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

Provide an optional debounce value for input updates #105

Open
iainjreid opened this issue Apr 4, 2017 · 2 comments
Open

Provide an optional debounce value for input updates #105

iainjreid opened this issue Apr 4, 2017 · 2 comments

Comments

@iainjreid
Copy link

iainjreid commented Apr 4, 2017

I've drafted a PR (#106) for a debounce feature allowing the input value to only be updated after N milliseconds of inactivity. This would dramatically reduce the pain of calling this.debounce in all of my application logic where user input causes spammy requests in some cases.

Does this look and or sound like a reasonable addition to this element? Improvement suggestions welcome!

iainjreid added a commit to iainjreid/polymer-elements_iron-input that referenced this issue Apr 4, 2017
This adds an optional 'debounceUpdate' parameter to the element to reduce spammy updates from the User in cases where a delayed update would be preferable.
@MeTaNoV
Copy link
Contributor

MeTaNoV commented Apr 20, 2017

would be gr8 to have this as default for any kind of input!

@iainjreid
Copy link
Author

Ideally, I think that this functionality would sit in a behaviour so it could be easily shared around, but the update logic in this component is currently tightly coupled with the component itself. Without some intervention or advice from the Polymer team, I'm not sure how easy that would be to orchestrate... As always, suggestions welcome though!

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

2 participants