Fallback to Item.row when converting to Modal component list

Fix #10397
This commit is contained in:
Rapptz
2026-02-04 18:57:04 -05:00
parent 3ab09be13c
commit a7d42b9906

View File

@@ -223,7 +223,7 @@ class Modal(BaseView):
def to_components(self) -> List[Dict[str, Any]]: def to_components(self) -> List[Dict[str, Any]]:
def key(item: Item) -> int: 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) children = sorted(self._children, key=key)
components: List[Dict[str, Any]] = [] components: List[Dict[str, Any]] = []