Skip to content

Commit 320ef3a

Browse files
authored
Merge pull request #365 from opf/delegate-items-to-submenu
Update SubMenuItem to delegate items call to SubMenu
2 parents cb159d2 + 982d4f6 commit 320ef3a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/hip-clowns-visit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openproject/primer-view-components': patch
3+
---
4+
5+
Delegate the items call to SubMenu of ActionMenu component

app/components/primer/alpha/action_menu/sub_menu_item.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ class ActionMenu
66
# This component is part of <%= link_to_component(Primer::Alpha::ActionMenu) %> and should not be
77
# used as a standalone component.
88
class SubMenuItem < ::Primer::Alpha::ActionList::Item
9+
delegate :items, to: :@sub_menu
10+
911
def initialize(content_arguments: {}, form_arguments: {}, **system_arguments)
1012
# We extract form_arguments from system_arguments here to avoid passing them to the
1113
# ActionList::Item base class or to the SubMenu instance. Doing so prevents a form

0 commit comments

Comments
 (0)