Combination of throttle and debounce in Alpine HTML directives? #4625
mikesnoeren
started this conversation in
3. Feature Ideas
Replies: 1 comment 1 reply
-
|
Chances are you actually should just not throttle it. that it isn't costly enough to create an issue if this is something that you're okay doing. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When checking
window.scrollY > 100for example, you could run into the problem where you don't catch the event when using.throttle. Therefore it would be great if Alpine allowed combining.throttleand.debouncemodifiers directly in HTML.Either by supporting them together like:
@scroll.window.throttle.100.debounce.200="handleScroll"Or by introducing a new combined modifier like:
@scroll.window.throttleDebounce.100.200="handleScroll"Right now, I’m working around this by manually wiring it up in JS:
Beta Was this translation helpful? Give feedback.
All reactions