Repository navigation
Releases: ivan-magda/swift-debounce
Releases · ivan-magda/swift-debounce
Release list
1.0.1
Fixed
ThrottlerandonChange(of:throttle:)now measure the interval from the moment the action really starts on its actor. Before, it was measured from when the throttler decided to start it, so if the main actor was busy at that moment, the next action could start right after the late one.
Documentation:
1.0.0
The first stable release. From here on, the public API follows Semantic Versioning.
Added
DebounceSwiftUIproduct withonChange(of:debounce:)andonChange(of:throttle:)view modifiers. The action is async, runs on the main actor, never overlaps itself, and is always the closure from the latest view update. The work ends when SwiftUI removes the view or its identity changes.PacingHandleto cancel the pending work of these modifiers, for example when the user submits a search right away.
Documentation:
0.1.0
Added
Debouncerwith leading, trailing, or both edges.Throttlerwith leading, trailing, or both edges.- Synchronous, thread-safe
send(_:), plussend()forVoid. cancel(); releasing a debouncer or throttler cancels it too.- Initializers that take a
Duration(iOS 16, macOS 13 and later) or aTimeInterval.
Documentation: https://ivan-magda.github.io/swift-debounce/documentation/debounce/