You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If final is removed, it would be easy to stream, redirect and force reload of frames in single response.
Example:
// some controllerreturnnewTurboResponse(
redirectUrl: $this->generateUrl('basket'),
reloadFrames: ['shopping-cart-frame', 'some-other-frame'], // ids of frames
);
and some glue js:
app.js
// listen for turbo eventsdocument.addEventListener('turbo:before-fetch-response',(event)=>{letredirectUrl=event.detail.fetchResponse.header('Turbo-Redirect');if(redirectUrl){Turbo.visit(redirectUrl);}letframesToReload=event.detail.fetchResponse.header('Turbo-Reload-Frame');if(framesToReload){framesToReload.trim().split(/\s*,\s*/).forEach((name)=>{document.getElementById(name)?.reload();});}});
If final is removed, it would be easy to stream, redirect and force reload of frames in single response.
Example:
and some glue js:
app.js
and custom response class:
App\Response\TurboResponse
The text was updated successfully, but these errors were encountered: