Skip to content

Commit fce6345

Browse files
Merge pull request #1936 from basecamp/use-self
Use buil-in support for :self in Stimulus
2 parents d5f8eed + effb965 commit fce6345

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

app/javascript/controllers/bubble_controller.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ export default class extends Controller {
2828
}
2929
}
3030

31-
morphed({target}) {
32-
if (this.element === target) {
33-
this.update()
34-
}
35-
}
36-
3731
get #hasEntropy() {
3832
return this.#entropyCleanupInDays < this.entropyValue.daysBeforeReminder
3933
}

app/views/cards/display/preview/_bubble.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class: "bubble",
55
data: {
66
controller: "bubble",
7-
action: "turbo:morph-element->bubble#morphed",
7+
action: "turbo:morph-element->bubble#update:self",
88
bubble_entropy_value: entropy_bubble_options_for(card).to_json,
99
bubble_stalled_value: stalled_bubble_options_for(card)&.to_json
1010
} do %>

0 commit comments

Comments
 (0)