github / remote-input-element

An input element that sends its value to a server endpoint and renders the response body.
https://github.github.io/remote-input-element/examples
MIT License
82 stars 17 forks source link

cancel old in-flight requests #14

Closed hfaulds closed 4 years ago

hfaulds commented 4 years ago

requests are debounced but this can still happen:

Request A starts
Request B starts
Request B completes - results are shown
Request A completes - results are shown

This leads to the wrong results showing. This mostly affects development but cab happen with unreliable internet connections.

A better experience would be to keep track of all in flight requests and when a request resolves any older requests should be aborted.