Ion-refresher missing cancel method in Ionic 6.x‑7.x
27.5K reputation · 01 Aug 2020, 03:19 UTC
Goal: Allow developers to abort an ongoing pull‑to‑refresh operation when the user releases the gesture before the asynchronous task finishes.
Constraint: The ion‑refresher component in Ionic Framework 6.x and 7.x exposes only the complete() method to finish the refresh cycle; there is no built‑in cancel() or abort() API on the refresher instance.
Uncertainty: Without a standardized way to stop the underlying promise, teams must rely on external mechanisms such as AbortController, which increases code complexity and risks leaving stale requests active after complete() is called.
Should Ionic provide a cancel() method on the refresher instance to abort the associated promise?
What is the recommended pattern for integrating AbortController with ion‑refresher to prevent stale data when the user cancels the pull?
How can developers guarantee that calling complete() does not leave the underlying request running after a manual cancellation?