app/components/katalyst/tables/query/modal_component.rb in katalyst-tables-3.5.5 vs app/components/katalyst/tables/query/modal_component.rb in katalyst-tables-3.6.0
- old
+ new
@@ -17,19 +17,24 @@
@collection = collection
end
def before_render
- collection.suggestions.each do |suggestion|
- with_suggestion(suggestion:)
+ collection.suggestions.each_with_index do |suggestion, index|
+ with_suggestion(suggestion:, index:)
end
end
private
def default_html_attributes
{
+ id: "suggestion-dialog",
class: "query-modal",
+ role: "dialog",
+ aria: {
+ label: t(".suggestions_title"),
+ },
data: {
tables__query_target: "modal",
action: ["turbo:before-morph-attribute->tables--query#beforeMorphAttribute"],
},
}