Target results frame and advance action
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<% end %>
|
||||
|
||||
<div class="search-perma margin-block-start">
|
||||
<%= 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 } %>
|
||||
|
||||
Reference in New Issue
Block a user