From c8d20045d4980c8b24504edd586c5648ba442d8a Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 22 Sep 2023 11:30:28 +0100 Subject: [PATCH] Fix option select styling Always ensure the option-select and checkbox stylesheets are requested, otherwise the helper methods to add the stylesheets are not called when caching is used --- app/views/finders/_option_select_facet.html.erb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/views/finders/_option_select_facet.html.erb b/app/views/finders/_option_select_facet.html.erb index 4540c4544..14469d8fd 100644 --- a/app/views/finders/_option_select_facet.html.erb +++ b/app/views/finders/_option_select_facet.html.erb @@ -1,3 +1,11 @@ +<%# + Always ensure the option-select and checkbox stylesheets are requested, + otherwise the helper methods to include the stylesheets are not called when + caching is used +%> +<% add_gem_component_stylesheet("option-select") %> +<% add_gem_component_stylesheet("checkboxes") %> + <% cache_if option_select_facet.cacheable?, option_select_facet.cache_key do %>
<%= render partial: 'govuk_publishing_components/components/option_select', locals: {