diff --git a/app/components/multiple_checked_select_component/multiple_checked_select_component.html.haml b/app/components/multiple_checked_select_component/multiple_checked_select_component.html.haml index f4ed6df88b..2abb2799b3 100644 --- a/app/components/multiple_checked_select_component/multiple_checked_select_component.html.haml +++ b/app/components/multiple_checked_select_component/multiple_checked_select_component.html.haml @@ -6,10 +6,11 @@ %div.filter %input{ type: "text", "data-multiple-checked-select-target": "filter", placeholder: @filter_placeholder } %hr - - @options.each do |option| - - classes = @selected.include?(option[1]) ? "selected" : "" - %div.menu_item{ class: classes, "data-multiple-checked-select-target": "option", "data-value": option[1], "data-label": option[0] } - %span.check - %span.name{id: option[1]} - = option[0] + %div.menu_items + - @options.each do |option| + - classes = @selected.include?(option[1]) ? "selected" : "" + %div.menu_item{ class: classes, "data-multiple-checked-select-target": "option", "data-value": option[1], "data-label": option[0] } + %span.check + %span.name{id: option[1]} + = option[0] %div{style: "display: none;", "data-multiple-checked-select-target": "inputs"} diff --git a/app/webpacker/css/admin/dropdown.scss b/app/webpacker/css/admin/dropdown.scss index fccc2276a0..cb1a3805fe 100644 --- a/app/webpacker/css/admin/dropdown.scss +++ b/app/webpacker/css/admin/dropdown.scss @@ -98,6 +98,11 @@ .menu { width: 100%; } + + .menu_items { + max-height: 200px; + overflow-y: scroll; + } } position: relative;