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

useDebounce arguments implementation/docs mismatch #484

Closed
10-mahmoud opened this issue Jan 10, 2024 · 2 comments
Closed

useDebounce arguments implementation/docs mismatch #484

10-mahmoud opened this issue Jan 10, 2024 · 2 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@10-mahmoud
Copy link

Link to the page where something isn't quite right

https://www.svelteui.org/composables/use-debounce

Exact quote of what is wrong

trailing	If true, call fn again after the time is up.
leading	If true, call fn on the leading edge of the ms timeout

The implementation only has an options object, with maxWait as the single parameter. I was actually hoping to use leading, as the current behavior of trailing doesn't feel as responsive.

Loving the library btw, thanks!

Are you willing to create pull request with the fix?

No

@BeeMargarida BeeMargarida added bug Something isn't working composable New or changes to composables documentation Improvements or additions to documentation and removed composable New or changes to composables labels Jan 10, 2024
@BeeMargarida
Copy link
Member

This seems to be a copy-paste error. If you want the trailing/leading behaviour, you can use the useThrottle composable.

@BeeMargarida
Copy link
Member

Docs deployed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants