File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -58,16 +58,21 @@ def __init__(
5858 super ().__init__ ()
5959
6060 self .items = [i for i in items ]
61- components = [i ._underlying for i in items ]
6261 self ._color = colour
6362
6463 self ._underlying = ContainerComponent ._raw_construct (
6564 type = ComponentType .container ,
6665 id = None ,
67- components = components ,
66+ components = [] ,
6867 accent_color = colour ,
6968 spoiler = spoiler ,
7069 )
70+ for i in items :
71+ if isinstance (i , ActionRow ):
72+ for c in i .children :
73+ self .add_item (c )
74+ else :
75+ self .add_item (i )
7176
7277 def add_item (self , item : Item ) -> None :
7378 """Adds an item to the container.
Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ def _component_to_item(component: Component) -> Item:
104104 from .container import Container
105105
106106 return Container .from_component (component )
107+ if isinstance (component , ActionRow ):
108+ # Handle ActionRow.children manually, or design ui.ActionRow?
109+
110+ return component
107111 return Item .from_component (component )
108112
109113
You can’t perform that action at this time.
0 commit comments