Skip to content

Commit

Permalink
Allow Oslo to be blank
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJackson-Oslo committed Oct 8, 2024
1 parent 7130737 commit 097c864
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<%= t("space_filter.filter_by_map_bounds") %>
<% end %>
<hr class="my-4" />
<% Fylke.includes(:kommuner).all.each do |fylke| %>
<% Fylke.includes(:kommuner).each do |fylke| %>
<div
data-controller="nested-checkbox-filter"
data-check-all-if-parent-is-checked="false"
Expand All @@ -27,7 +27,7 @@
id: "geo_area_#{fylke.id}",
multiple: true,
data: {
'nested-checkbox-filter-target': 'parent',
'nested-checkbox-filter-target': fylke.kommuner.any? ? 'parent' : nil,
},
class: "h-5 w-5 relative top-0.5 text-lnu-pink focus:ring-lnu-pink border-gray-300 rounded",
onchange: "this.form.requestSubmit()",
Expand All @@ -39,6 +39,8 @@
<%= fylke.name %>
<% end %>
<% next if fylke.kommuner.empty? %>

<div class="ml-4 pb-2 hidden" data-nested-checkbox-filter-target="childrenContainer">
<% fylke.kommuner.each do |kommune| %>
<%= form.label "geo_area_#{kommune.id}", class: "flex gap-1 my-1 items-top" do %>
Expand Down

0 comments on commit 097c864

Please sign in to comment.