Save a bunch of invocations on morph events from children elements

This commit is contained in:
Jorge Manrubia
2025-12-04 21:27:22 +01:00
parent 704b5b9788
commit 9639e07ab8
2 changed files with 7 additions and 1 deletions
@@ -28,6 +28,12 @@ export default class extends Controller {
}
}
morphed({target}) {
if (this.element === target) {
this.update()
}
}
get #hasEntropy() {
return this.#entropyCleanupInDays < this.entropyValue.daysBeforeReminder
}
@@ -4,7 +4,7 @@
class: "bubble",
data: {
controller: "bubble",
action: "turbo:morph-element->bubble#update",
action: "turbo:morph-element->bubble#morphed",
bubble_entropy_value: entropy_bubble_options_for(card).to_json,
bubble_stalled_value: stalled_bubble_options_for(card)&.to_json
} do %>