app/components/katalyst/turbo/table_component.rb in katalyst-tables-2.2.9 vs app/components/katalyst/turbo/table_component.rb in katalyst-tables-2.2.10
- old
+ new
@@ -24,19 +24,18 @@
private
def default_html_attributes
{
data: {
- controller: "tables--turbo-collection",
- tables__turbo_collection_url_value: current_path,
- tables__turbo_collection_sort_value: collection.sort,
+ controller: "tables--turbo-collection",
+ tables__turbo_collection_query_value: current_query,
+ tables__turbo_collection_sort_value: collection.sort,
},
}
end
- def current_path
- params = collection.to_params
- params.empty? ? "" : "?#{Rack::Utils.build_nested_query(params)}"
+ def current_query
+ Rack::Utils.build_nested_query(collection.to_params)
end
def default_header_options
{ link: { data: { turbo_stream: "" } } }
end