File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -2152,6 +2152,7 @@ class Component {
21522152        if  ( ! controls . shouldRender )  { 
21532153            return ; 
21542154        } 
2155+         this . hooks . triggerHook ( 'loading.state:finished' ,  this . element ) ; 
21552156        if  ( backendResponse . response . headers . get ( 'Location' ) )  { 
21562157            if  ( this . isTurboEnabled ( ) )  { 
21572158                Turbo . visit ( backendResponse . response . headers . get ( 'Location' ) ) ; 
@@ -2161,7 +2162,6 @@ class Component {
21612162            } 
21622163            return ; 
21632164        } 
2164-         this . hooks . triggerHook ( 'loading.state:finished' ,  this . element ) ; 
21652165        const  modifiedModelValues  =  { } ; 
21662166        Object . keys ( this . valueStore . getDirtyProps ( ) ) . forEach ( ( modelName )  =>  { 
21672167            modifiedModelValues [ modelName ]  =  this . valueStore . get ( modelName ) ; 
Original file line number Diff line number Diff line change @@ -351,6 +351,11 @@ export default class Component {
351351            return ; 
352352        } 
353353
354+         // remove the loading behavior now so that when we morphdom 
355+         // "diffs" the elements, any loading differences will not cause 
356+         // elements to appear different unnecessarily 
357+         this . hooks . triggerHook ( 'loading.state:finished' ,  this . element ) ; 
358+ 
354359        if  ( backendResponse . response . headers . get ( 'Location' ) )  { 
355360            // action returned a redirect 
356361            if  ( this . isTurboEnabled ( ) )  { 
@@ -362,11 +367,6 @@ export default class Component {
362367            return ; 
363368        } 
364369
365-         // remove the loading behavior now so that when we morphdom 
366-         // "diffs" the elements, any loading differences will not cause 
367-         // elements to appear different unnecessarily 
368-         this . hooks . triggerHook ( 'loading.state:finished' ,  this . element ) ; 
369- 
370370        /** 
371371         * For any models modified since the last request started, grab 
372372         * their value now: we will re-set them after the new data from 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments