pierrejeambrun commented on code in PR #23678:
URL: https://github.com/apache/airflow/pull/23678#discussion_r873196484


##########
airflow/www/static/js/grid/renderTaskRows.jsx:
##########
@@ -56,36 +57,41 @@ const renderTaskRows = ({
 
 const TaskInstances = ({
   task, dagRunIds, selectedRunId, onSelect,
-}) => (
-  <Flex justifyContent="flex-end">
-    {dagRunIds.map((runId) => {
-      // Check if an instance exists for the run, or return an empty box
-      const instance = task.instances.find((gi) => gi.runId === runId);
-      const isSelected = selectedRunId === runId;
-      return (
-        <Box
-          py="4px"
-          px={boxPaddingPx}
-          className={`js-${runId}`}
-          data-selected={isSelected}
-          transition="background-color 0.2s"
-          key={`${runId}-${task.id}`}
-          bg={isSelected && 'blue.100'}
-        >
-          {instance
-            ? (
-              <StatusBox
-                instance={instance}
-                group={task}
-                onSelect={onSelect}
-              />
-            )
-            : <Box width={boxSizePx} data-testid="blank-task" />}
-        </Box>
-      );
-    })}
-  </Flex>
-);
+}) => {
+  const { filters: { taskState } } = useFilters();

Review Comment:
   We are now using a state at higher level. Performances seem better.



-- 
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