'Why doesn't fetch() trigger turbo frames replacement?
I have a turbo frame as follows:
<turbo-frame id="details">
Select a movie for more details...
</turbo-frame>
This frame is properly replaced when the a tag in the following is clicked, because the route /movie/show/1 returns a turbo frame with an id of "details"
<turbo-frame class="movie-cards" id="index">
<a class="movie-card" data-turbo-frame="details" href="/movie/show/1">
<div class="movie-item-detail text-center">
LOTR
</div>
</a>
</turbo-frame>
However, running fetch("/movie/show/1") in the console returns the same turbo-frame response but doesn't replace anything. Why is this? Is there a way in general to cause a javascript-initiated request to update a turbo frame?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
