Merge pull request #8525 from colinux/fix-dropdown-turbo

fix(menu_component): tag html options must be set as keyword args, not hash
This commit is contained in:
Colin Darie 2023-01-30 15:16:03 +01:00 committed by GitHub
commit 960ba98378
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,7 @@ class Dropdown::MenuComponent < ApplicationComponent
renders_one :button_inner_html
# beware, items elements like button_to/link_to must include role: 'menuitem' for aria reason
renders_many :items, -> (options = {}, &block) do
tag.li({ role: 'none' }.merge(options), &block)
tag.li(**options.merge(role: 'none'), &block)
end
renders_many :forms