bbovenzi commented on code in PR #41342:
URL: https://github.com/apache/airflow/pull/41342#discussion_r1710121649


##########
airflow/www/static/js/dag/details/gantt/index.tsx:
##########
@@ -136,21 +134,30 @@ const Gantt = ({ openGroupIds, gridScrollRef, 
ganttScrollRef }: Props) => {
 
       if (end && (!endDate || Date.parse(end) > Date.parse(endDate))) {
         setEndDate(end);
+      } else if (!end) {
+        // @ts-ignore
+        setEndDate(moment().add(1, "s").toString());
       }
     },
     [startDate, endDate, setStartDate, setEndDate]
   );
 
+  // Reset state when the dagrun changes
   useEffect(() => {
-    groups.children?.forEach((task) => {

Review Comment:
   Instead of iterating through the array multiple times, let's just call 
setGanttDuration from each row component.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to