Skip to content

Commit

Permalink
make whole item clickable and enable scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
lbelenda committed Dec 30, 2024
1 parent 1b91cbf commit 3ac30a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/views/components/ui/_filter_multiple.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<%= render_input name: "filter multiple", placeholder: "Filter items...", variant: :borderless, class: input_class, data: {"ui--filter-multiple-target": "source", action: "input->ui--filter-multiple#filter"} %>
</div>
<%= render_separator %>
<div class="<%= options[:class] %>">
<div class="<%= options[:class] %> max-h-48 overflow-y-auto">
<%= content_tag :div, role: "group" do %>
<% items.each do |item| %>
<div data-ui--filter-multiple-target="item">
<input type='checkbox' name='<%= item[:name] %>' value='<%= item[:value] %>' <%= 'checked' if item[:selected] %>> <%= item[:name] %>
</div>
<label data-ui--filter-multiple-target="item" class="block cursor-pointer p-2">
<input type='checkbox' name='<%= item[:name] %>' value='<%= item[:value] %>' <%= 'checked' if item[:selected] %> class="mr-2"> <%= item[:name] %>
</label>
<% end %>
<% end %>
</div>
Expand Down

0 comments on commit 3ac30a1

Please sign in to comment.