yjaw commented on code in PR #62352:
URL: https://github.com/apache/airflow/pull/62352#discussion_r2840853396


##########
airflow-core/src/airflow/ui/src/components/ui/Pagination/Items.tsx:
##########
@@ -24,13 +24,15 @@ import { Item } from "./Item";
 export const Items = (props: React.HTMLAttributes<HTMLElement>) => (
   <ChakraPagination.Context>
     {({ pages }) =>
-      pages.map((page, index) =>
-        page.type === "ellipsis" ? (
-          <Ellipsis index={index} key={page.type} {...props} />
-        ) : (
-          <Item key={page.value} type="page" value={page.value} {...props} />
-        ),
-      )
+      pages.map((page, index) => {
+        if (page.type === "ellipsis") {
+          const prevVal = (pages[index - 1] as { value: number }).value;
+
+          return <Ellipsis index={index} key={`ellipsis-${prevVal}`} 
{...props} />;

Review Comment:
   I think using index won't be a problem in this scenario. How can I bypass 
linter?



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