diff --git a/src/LiveComponent/assets/dist/live_controller.js b/src/LiveComponent/assets/dist/live_controller.js index ddb40ed667d..ee45b692254 100644 --- a/src/LiveComponent/assets/dist/live_controller.js +++ b/src/LiveComponent/assets/dist/live_controller.js @@ -549,8 +549,8 @@ var HookManager_default = class { } }; -// ../../../node_modules/.pnpm/idiomorph@0.3.0/node_modules/idiomorph/dist/idiomorph.esm.js -var Idiomorph = function() { +// ../../../node_modules/idiomorph/dist/idiomorph.esm.js +var Idiomorph = (function() { "use strict"; let EMPTY_SET = /* @__PURE__ */ new Set(); let defaults = { @@ -1093,7 +1093,7 @@ var Idiomorph = function() { morph, defaults }; -}(); +})(); // src/normalize_attributes_for_comparison.ts function normalizeAttributesForComparison(element) { @@ -2045,6 +2045,7 @@ var Component = class { if (!controls.shouldRender) { return; } + this.hooks.triggerHook("loading.state:finished", this.element); if (backendResponse.response.headers.get("Location")) { if (this.isTurboEnabled()) { Turbo.visit(backendResponse.response.headers.get("Location")); @@ -2053,7 +2054,6 @@ var Component = class { } return; } - this.hooks.triggerHook("loading.state:finished", this.element); const modifiedModelValues = {}; Object.keys(this.valueStore.getDirtyProps()).forEach((modelName) => { modifiedModelValues[modelName] = this.valueStore.get(modelName); diff --git a/src/LiveComponent/assets/src/Component/index.ts b/src/LiveComponent/assets/src/Component/index.ts index 2a7decb6ae4..ea7bc5a88d4 100644 --- a/src/LiveComponent/assets/src/Component/index.ts +++ b/src/LiveComponent/assets/src/Component/index.ts @@ -359,6 +359,11 @@ export default class Component { return; } + // remove the loading behavior now so that when we morphdom + // "diffs" the elements, any loading differences will not cause + // elements to appear different unnecessarily + this.hooks.triggerHook('loading.state:finished', this.element); + if (backendResponse.response.headers.get('Location')) { // action returned a redirect if (this.isTurboEnabled()) { @@ -370,11 +375,6 @@ export default class Component { return; } - // remove the loading behavior now so that when we morphdom - // "diffs" the elements, any loading differences will not cause - // elements to appear different unnecessarily - this.hooks.triggerHook('loading.state:finished', this.element); - /** * For any models modified since the last request started, grab * their value now: we will re-set them after the new data from