Skip to content

Commit

Permalink
Fix loading indicator reset on dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
virolea committed Sep 6, 2024
1 parent 186a322 commit 529ffa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/assets/builds/rosetta/application.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import { Controller } from "@hotwired/stimulus";
export default class extends Controller {
static targets = ["dialog", "content", "title", "titleSource", "turboFrame"];

initialize() {
this.loadingIndicator = this.turboFrameTarget.innerHTML;
}

open(e) {
e.preventDefault();
const link = e.currentTarget;
this.dialogTarget.showModal();
this.loadingIndicator = this.contentTarget.innerHTML;
this.turboFrameTarget.src = link.href;
}

Expand Down

0 comments on commit 529ffa3

Please sign in to comment.