-
-
Notifications
You must be signed in to change notification settings - Fork 180
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Report
The div below will freely run additional @gets without aborting existing ones. The @get in question provides and infinite stream of events, so eventually I get many overlapping events streams in flight. The documentation says that I should get "auto" abort behavior such that an existing fetch will be aborted whenever a new one on the same element is issued.
<div class="d-flex flex-column"
data-persist-traces__session=""
data-persist="{include: /^port$/}"
data-signals="{port: 1, loadedPort: -1}"
data-effect="($port != $loadedPort) && ($loadedPort = $port, @get('/h/traces/updates/' + $port))">
...
A slightly older version of this code (below) does abort properly, but it has the problem of the data-effect code being invoked superfluously when $port has not actually changed. (Hence the change-checking logic in the above version).
<div class="d-flex flex-column"
data-persist-traces__session=""
data-persist="{include: /^port$/}"
data-signals="{port: 1, loadedPort: -1}"
data-effect="@get('/h/traces/updates/' + $port)">
...
Datastar Version
v1.0.0_rc5
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working