Skip to content

Commit 982d4f6

Browse files
committed
Update SubMenuItem to delegate items call to SubMenu
1 parent cb159d2 commit 982d4f6

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.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)