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

add debounce option #111

Open
gr2m opened this issue May 7, 2016 · 0 comments
Open

add debounce option #111

gr2m opened this issue May 7, 2016 · 0 comments

Comments

@gr2m
Copy link
Member

gr2m commented May 7, 2016

follow up for hoodiehq/hoodie#202

Use case: continuously saving a text entered by a user with every key stroke. Instead of creating thousands of revisions, we want to store the current text in memory for a short time and only save after the user stopped typing for a moment (e.g. 2 seconds).

Suggested API

hoodie.store.add('doc', properties, {debounce: true})

or set a custom timeout in ms

hoodie.store.add('doc', properties, {debounce: 5000})
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