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 method to fire any scheduled use-debounce call now #134

Open
Coronon opened this issue Sep 4, 2024 · 1 comment
Open

add method to fire any scheduled use-debounce call now #134

Coronon opened this issue Sep 4, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Coronon
Copy link

Coronon commented Sep 4, 2024

Describe the feature in detail (code, mocks, or screenshots encouraged)

Context

I frequently use the use-debounce hook in my application to manage delayed function executions. However, there are scenarios, such as when closing a modal, where I need to immediately trigger the scheduled debounced callback instead of waiting for the remaining debounce period. This functionality would be especially beneficial in ensuring that important callbacks are not lost or delayed when the debounce period is no longer relevant.

Request

I am requesting an enhancement to the use-debounce hook that allows for the immediate resolution of any scheduled callbacks. This could be implemented via a method (e.g., resolveNow) that forces the execution of the debounced function at the current time, bypassing any remaining debounce delay.

What type of pull request would this be?

Enhancement

Provide relevant links or additional information.

https://runed.dev/docs/utilities/use-debounce

@Coronon Coronon added the enhancement New feature or request label Sep 4, 2024
@huntabyte
Copy link
Member

I think this is a reasonable request! Open to PRs if anyone is interested in contributing this!

@huntabyte huntabyte added the help wanted Extra attention is needed label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants