mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-02-21 20:20:34 +09:00
12 lines
372 B
JavaScript
12 lines
372 B
JavaScript
import { Controller } from "@hotwired/stimulus"
|
|
|
|
// Unsubscribe a container from turbo streaming actions (by removing its id) can address timing jank
|
|
// when turbo streaming updates race against a full controller response.
|
|
export default class extends Controller {
|
|
static targets = [ "container" ]
|
|
|
|
unsubscribe() {
|
|
this.containerTarget.removeAttribute("id")
|
|
}
|
|
}
|