diff --git a/discord/ui/modal.py b/discord/ui/modal.py index db8bf5241..1da93478b 100644 --- a/discord/ui/modal.py +++ b/discord/ui/modal.py @@ -223,7 +223,7 @@ class Modal(BaseView): def to_components(self) -> List[Dict[str, Any]]: def key(item: Item) -> int: - return item._rendered_row or 0 + return item._rendered_row or item.row or 0 children = sorted(self._children, key=key) components: List[Dict[str, Any]] = []