I have a rails controller that renders search results in a turbo_stream. But, the rendered links don’t navigate. Clicks result in no action. I’m not sure how to link outside of the stream.
controller:
respond_to do |format|
format.turbo_stream do
render turbo_stream: [
turbo_stream.update("autosuggest_results", partial: "search/autosuggest_results", locals: { items: @items })
]
end
end
view partial:
<% items.each do |item| %>
<li class="py-4 flex">
<div class="ml-3">
<%= link_to item.title, place_path(item.id), data: { turbo_frame: "_top" } %>
<p class="text-sm font-medium text-gray-900"><%= item.title %></p>
</div>
</li>
<% end %>