Skip to content

Commit

Permalink
Fix loading indicator appears again on browser back
Browse files Browse the repository at this point in the history
Refs. 32e6b14
  • Loading branch information
mshibuya committed Aug 6, 2022
1 parent 3a177c2 commit b9ee7f0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/rails_admin/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ import I18n from "./i18n";
$("#list [name='bulk_ids[]']").prop("checked", $(this).is(":checked"));
});

$(document).on("turbo:click", function () {
return $("#loading").show();
});
$(document)
.on("turbo:click", function () {
return $("#loading").show();
})
.on("turbo:before-render", function () {
return $("#loading").hide();
});

$(document).on("click", "[data-bs-target]", function () {
if (!$(this).hasClass("disabled")) {
Expand Down

0 comments on commit b9ee7f0

Please sign in to comment.