diff --git a/app/views/trestle/search/_search.html.erb b/app/views/trestle/search/_search.html.erb
index 4d9b00b..de49bc9 100644
--- a/app/views/trestle/search/_search.html.erb
+++ b/app/views/trestle/search/_search.html.erb
@@ -2,12 +2,14 @@
<% if admin.searchable? %>
<%= form_tag admin.path, method: :get, data: { turbo_frame: "main" } do %>
+ <%= serialize_persistent_params except: :q %>
+
<%= label_tag :q, icon("fas fa-search"), class: "input-group-text" %>
<%= search_field_tag :q, params[:q], class: "form-control", autocomplete: "off", placeholder: admin.t("search.placeholder", default: "Search") %>
- <%= link_to icon("fas fa-times"), admin.path, class: "btn btn-clear-search", data: { turbo_frame: "main" } if params[:q].present? %>
+ <%= link_to icon("fas fa-times"), persistent_params.except(:q), class: "btn btn-clear-search", data: { turbo_frame: "main" } if params[:q].present? %>
<% end %>
@@ -16,9 +18,7 @@
<% if admin.filterable? %>
<%= form_for admin.filters, as: :f, url: admin.path, method: :get, builder: Trestle::Form::Builder, html: { id: nil, class: nil, data: { turbo_frame: "main" } } do |f| %>
- <% persistent_params.each do |k, v| %>
- <%= hidden_field_tag k, v unless k == "f" %>
- <% end %>
+ <%= serialize_persistent_params except: :f %>