Back to Pull RequestsView on GitHub
#1091Closed
Simple Review
Emit the last event from a throttle interval when using 'trailing'
by gazpachoking•Nov 6, 2025
Summary
This PR fixes an issue with the throttle event modifier in Datastar. Previously, when using the 'trailing' option, the throttled event would fire with the first event within the throttle window instead of the last. This change ensures the last event is correctly emitted, and also prevents duplicate event emissions when both leading and trailing edges are enabled for throttle/debounce.
Changes
+19 additions-36 deletions
Impact Areas
Event HandlingPerformance