useDebounce arguments implementation/docs mismatch
10-mahmoud opened this issue · 2 comments
10-mahmoud commented
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 commented
This seems to be a copy-paste error. If you want the trailing/leading behaviour, you can use the useThrottle
composable.
BeeMargarida commented
Docs deployed!