Open volodymyr-nt opened 3 days ago
Upd: Found that problem lies in this line:
https://github.com/hotwired/turbo/blob/ea54ae5ad4b6b28cb62ccd62951352641ed08293/src/core/drive/navigator.js#L138
In my case i navigate back to /
page which is the same page that was rendered by Turbo last time
Alternative workaround is about doing push and setting lastRenderedLocation:
<%# In <head> for filter page or globally %>
<meta name="turbo-cache-control" content="no-cache">
Turbo.navigator.history.push(filterUrl);
Turbo.navigator.view.lastRenderedLocation = filterUrl;
// or
Turbo.navigator.history.push(filterUrl);
Turbo.session.pageBecameInteractive();
Would be nice to have the same behavior like listed in code snippet above as one method and part of public Turbo api.
Hi. I have filter form where i fetch turbo stream responses and push state updates with
Following flow is broken:
/
page loaded.Turbo.navigator.history.push(filterUrl)
) - updates url, pushes state - everything ok.I found only one workaround for this using stimulus:
Is this bug in stimulus? Are there some options or more elegant workarounds?