Sha256: a0836a4fb2dfe0752307110feeba6b4fb23d965b3a8920663e75982588f919ba
Contents?: true
Size: 1.17 KB
Versions: 7
Compression:
Stored size: 1.17 KB
Contents
<% set_value = filter.default.present? ? filter.default.select { |key, value| value }.keys.map(&:to_sym) : {} begin decoded_filters_param = JSON.parse(Base64.decode64(params[:filters])) if decoded_filters_param[filter.class.to_s].present? set_value = decoded_filters_param[filter.class.to_s] end rescue end %> <div data-controller="multiple-select-filter" data-filter-name="<%= filter.name %>"> <%= filter_wrapper name: filter.name do %> <%= select_tag filter.id, options_for_select(filter.options.invert, set_value), class: input_classes('w-full mb-0'), multiple: true, id: "avo_filters_#{filter.id.parameterize.underscore}", 'data-filter-class': filter.class.to_s, 'data-multiple-select-filter-target': 'selector' %> <div class="flex justify-end"> <%= a_button class: 'mt-4', color: :blue, size: :sm, data: { action: "multiple-select-filter#changeFilter" } do %> Filter by <%=filter.name %> <% end %> </div> <%= link_to 'url_redirect', request.url, data: { 'multiple-select-filter-target': 'urlRedirect', 'turbo-frame': params[:turbo_frame] }, style: 'hidden', class: 'hidden' %> <% end %> </div>
Version data entries
7 entries across 7 versions & 1 rubygems