From 5137abdee02aa395cdf0d385a31df2ac043513a3 Mon Sep 17 00:00:00 2001 From: Rainer Dema Date: Tue, 12 Dec 2023 19:11:35 +0100 Subject: [PATCH 1/2] Enhance flexibility of filter toolbar display Updated the filter toolbar to accommodate multiple filters. - Implemented flex-wrap in the toolbar to allow filters to wrap onto new lines when space is limited. - Adjusted minimum height for dynamic expansion. --- admin/app/components/solidus_admin/ui/table/component.html.erb | 2 +- .../app/components/solidus_admin/ui/table/toolbar/component.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/app/components/solidus_admin/ui/table/component.html.erb b/admin/app/components/solidus_admin/ui/table/component.html.erb index 22302aa7246..e0b79da9819 100644 --- a/admin/app/components/solidus_admin/ui/table/component.html.erb +++ b/admin/app/components/solidus_admin/ui/table/component.html.erb @@ -51,7 +51,7 @@ <% end %> <% if @search.filters.any? %> - <%= render component("ui/table/toolbar").new("data-#{stimulus_id}-target": "filterToolbar", hidden: initial_mode != "search") do %> + <%= render component("ui/table/toolbar").new("data-#{stimulus_id}-target": "filterToolbar", hidden: initial_mode != "search", class: "flex-wrap") do %> <% @search.filters.each_with_index do |filter, index| %> <%= render_ransack_filter_dropdown(filter, index) %> <% end %> diff --git a/admin/app/components/solidus_admin/ui/table/toolbar/component.rb b/admin/app/components/solidus_admin/ui/table/toolbar/component.rb index 58c6d5f2ca2..54370765f25 100644 --- a/admin/app/components/solidus_admin/ui/table/toolbar/component.rb +++ b/admin/app/components/solidus_admin/ui/table/toolbar/component.rb @@ -10,7 +10,7 @@ def call content, **@options, class: " - h-14 p-2 bg-white border-b border-gray-100 + min-h-14 p-2 bg-white border-b border-gray-100 justify-start items-center gap-2 visible:flex hidden:hidden rounded-t-lg From aebb511ac50d8bd2c87ed1ec48718bbf0d03d597 Mon Sep 17 00:00:00 2001 From: Rainer Dema Date: Tue, 12 Dec 2023 19:11:43 +0100 Subject: [PATCH 2/2] Fix z-index issue for filter dropdowns Resolved a z-index issue where filter dropdowns were obscured by underlying elements. Added a higher z-index value to ensure dropdowns appear above other content. --- .../solidus_admin/ui/table/ransack_filter/component.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/app/components/solidus_admin/ui/table/ransack_filter/component.html.erb b/admin/app/components/solidus_admin/ui/table/ransack_filter/component.html.erb index 76d2a121392..5c4a5c051bc 100644 --- a/admin/app/components/solidus_admin/ui/table/ransack_filter/component.html.erb +++ b/admin/app/components/solidus_admin/ui/table/ransack_filter/component.html.erb @@ -24,6 +24,7 @@ rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 + z-10 ">
<% if @selections.size > 6 %>