This is an automated email from the ASF dual-hosted git repository.
jscheffl pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 336089c71c1 Fix grid sort bug (#46182)
336089c71c1 is described below
commit 336089c71c1cab7a239c488a6ad4d26accc9ae6f
Author: Brent Bovenzi <[email protected]>
AuthorDate: Tue Jan 28 15:25:16 2025 -0500
Fix grid sort bug (#46182)
---
airflow/ui/src/components/TaskTrySelect.tsx | 4 ++--
airflow/ui/src/layouts/Details/Grid/Grid.tsx | 8 +++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/airflow/ui/src/components/TaskTrySelect.tsx
b/airflow/ui/src/components/TaskTrySelect.tsx
index 210208bac5f..88e32f9f9e3 100644
--- a/airflow/ui/src/components/TaskTrySelect.tsx
+++ b/airflow/ui/src/components/TaskTrySelect.tsx
@@ -94,8 +94,8 @@ export const TaskTrySelect = ({ onSelectTryNumber,
selectedTryNumber, taskInstan
) => <StateBadge
state={items[0]?.task_instance.state}>{items[0]?.value}</StateBadge>}
</Select.ValueText>
</Select.Trigger>
- <Select.Content>
- {tryOptions.items.reverse().map((option) => (
+ <Select.Content flexDirection="column-reverse">
+ {tryOptions.items.map((option) => (
<Select.Item item={option} key={option.value}>
<span>
{option.value}:
diff --git a/airflow/ui/src/layouts/Details/Grid/Grid.tsx
b/airflow/ui/src/layouts/Details/Grid/Grid.tsx
index c9b97e05655..1e36c2a763e 100644
--- a/airflow/ui/src/layouts/Details/Grid/Grid.tsx
+++ b/airflow/ui/src/layouts/Details/Grid/Grid.tsx
@@ -139,9 +139,11 @@ export const Grid = () => {
</>
)}
</Flex>
- {runs.reverse().map((dr, index) => (
- <Bar index={index} key={dr.dag_run_id} limit={limit} max={max}
nodes={flatNodes} run={dr} />
- ))}
+ <Flex flexDirection="row-reverse">
+ {runs.map((dr, index) => (
+ <Bar index={index} key={dr.dag_run_id} limit={limit} max={max}
nodes={flatNodes} run={dr} />
+ ))}
+ </Flex>
<IconButton
aria-label={`+${OFFSET_CHANGE} newer dag runs`}
disabled={offset === 0}