From a7d42b990645fff59c27d59873ad95815210ba4b Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 4 Feb 2026 18:57:04 -0500 Subject: [PATCH] Fallback to Item.row when converting to Modal component list Fix #10397 --- discord/ui/modal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]] = []