Convey selected state of filters on Relationships page

This commit is contained in:
diondiondion
2026-05-21 17:20:51 +02:00
parent cafe7ea35c
commit 87abf809cf

View File

@@ -20,8 +20,9 @@ module Admin::FilterHelper
def filter_link_to(text, link_to_params, link_class_params = link_to_params)
new_url = filtered_url_for(link_to_params)
new_class = filtered_url_for(link_class_params)
is_selected = selected?(link_class_params)
link_to text, new_url, class: filter_link_class(new_class)
link_to text, new_url, class: filter_link_class(new_class), 'aria-current': (is_selected ? 'true' : nil)
end
def table_link_to(icon, text, path, **options)