From 58da5a7ef1b14dfbaf1b7a1bfced9ec3bdb1285c Mon Sep 17 00:00:00 2001 From: Jose Farias Date: Fri, 3 May 2024 19:43:28 -0600 Subject: [PATCH] Give pagination wrapped a small height --- app/views/hotwire_combobox/_component.html.erb | 6 +++++- app/views/hotwire_combobox/_pagination.html.erb | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/views/hotwire_combobox/_component.html.erb b/app/views/hotwire_combobox/_component.html.erb index 0bef63f..f061575 100644 --- a/app/views/hotwire_combobox/_component.html.erb +++ b/app/views/hotwire_combobox/_component.html.erb @@ -4,7 +4,7 @@ <%= render "hotwire_combobox/combobox/hidden_field", component: component %> <%= tag.div **component.main_wrapper_attrs do %> - <%# Announcer styles defined here because they're not optional %> + <%# Essential styles defined here, removing these would break the combobox %> <%= tag.style nonce: content_security_policy_nonce do %> .hw-combobox__announcer { position: absolute; @@ -16,6 +16,10 @@ clip: rect(0, 0, 0, 0); border: 0; } + + .hw_combobox__pagination__wrapper { + height: 5px; + } <% end %> <%= tag.div **component.announcer_attrs %> <%= render "hotwire_combobox/combobox/input", component: component %> diff --git a/app/views/hotwire_combobox/_pagination.html.erb b/app/views/hotwire_combobox/_pagination.html.erb index eab9b0b..88c92ff 100644 --- a/app/views/hotwire_combobox/_pagination.html.erb +++ b/app/views/hotwire_combobox/_pagination.html.erb @@ -1,7 +1,7 @@ <%# locals: (for_id:, src:) -%> -<%= tag.li id: hw_pagination_frame_wrapper_id(for_id), data: { - hw_combobox_target: "endOfOptionsStream", input_type: params[:input_type] }, +<%= tag.li id: hw_pagination_frame_wrapper_id(for_id), class: "hw_combobox__pagination__wrapper", + data: { hw_combobox_target: "endOfOptionsStream", input_type: params[:input_type] }, aria: { hidden: true } do %> <%= turbo_frame_tag hw_pagination_frame_id(for_id), src: src, loading: :lazy %> <% end %>