Skip to content

Commit

Permalink
Give pagination wrapped a small height (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
josefarias committed May 4, 2024
1 parent 2df4a2b commit 520d175
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/views/hotwire_combobox/_component.html.erb
Expand Up @@ -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;
Expand All @@ -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 %>
Expand Down
4 changes: 2 additions & 2 deletions 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 %>

0 comments on commit 520d175

Please sign in to comment.