From 57249fb9b77f8d91914b46fcc70d5dcaf2734a6c Mon Sep 17 00:00:00 2001 From: Adrien Maston Date: Wed, 4 Mar 2026 10:29:07 +0100 Subject: [PATCH] Target results frame and advance action --- app/views/searches/_form.html.erb | 1 + app/views/searches/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/searches/_form.html.erb b/app/views/searches/_form.html.erb index 88bcafee0..682ce497b 100644 --- a/app/views/searches/_form.html.erb +++ b/app/views/searches/_form.html.erb @@ -4,6 +4,7 @@ controller: "search-form", action: "search-form:reset->bar#reset", bar_target: "form", + turbo_action: defined?(turbo_action) ? turbo_action : nil, turbo_frame: defined?(target_turbo_frame) ? target_turbo_frame : nil } do |form| %> <%= form.label :q, "Search Fizzy", class: "font-weight-black txt-nowrap" %> <%= text_field_tag :q, query_terms, diff --git a/app/views/searches/show.html.erb b/app/views/searches/show.html.erb index 8a802a3bd..2a23d1449 100644 --- a/app/views/searches/show.html.erb +++ b/app/views/searches/show.html.erb @@ -9,7 +9,7 @@ <% end %>
- <%= render "form", query_terms: @query %> + <%= render "form", query_terms: @query, turbo_action: "advance", target_turbo_frame: "bar_content" %> <%= turbo_frame_tag "bar_content" do %> <% if @card %> <%= auto_submit_form_with url: card_path(@card), method: :get, data: { turbo_action: "advance", turbo_frame: "_top", search_redirect: true } %>