WarUI

Request cancellation

GRID-A04-F16P0baselinePlanned

Passes an AbortSignal with every request and aborts requests that are no longer needed: the block scrolled out of range, the sort or filter changed, the block was evicted, or the grid was destroyed. Results from aborted requests are always ignored, even if the source does not honour the signal.

Planned. This page shows the specification from issue #180. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

Latency is 2000 ms, and the request log shows the status of each request.

Expected behavior

Scrolling away from a pending block marks it 'cancelled: outOfRange'. A filter change marks earlier requests 'cancelled: modelChanged'. If the source ignores the signal, its late responses are logged as 'discarded'.

Planned API surface

request.signaloption: cancelOutOfRangeRequestsevent: requestCancelled (reason)api.cancelPendingRequests()

Acceptance criteria

  • Every request carries a unique AbortSignal. (pending)
  • Destroying the grid aborts all pending requests. (pending)
  • Responses from aborted requests never change the cache. (pending)
  • Cancellation reasons are one of: outOfRange, modelChanged, evicted, destroyed, manual, superseded. (pending)