You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2023/01/11 15:30:08 UTC

[GitHub] [superset] kgabryje commented on a diff in pull request #22502: fix: Adjust useChildElementTruncation to eliminate infinite loop issue

kgabryje commented on code in PR #22502:
URL: https://github.com/apache/superset/pull/22502#discussion_r1067113187


##########
superset-frontend/src/components/ListView/CrossLinks.tsx:
##########
@@ -92,28 +88,29 @@ export default function CrossLinks({
         ))}
       </span>
     ),
-    [crossLinks],
+    [linkPrefix, crossLinks],
   );
+
   const tooltipLinks = useMemo(
     () =>
       crossLinks.slice(0, maxLinks).map(l => ({
         title: l.title,
         to: linkPrefix + l.id,
       })),
-    [crossLinks, maxLinks],
+    [crossLinks, maxLinks, linkPrefix],
   );
 
   return (
     <StyledCrossLinks>
       <CrossLinksTooltip
         moreItems={hasMoreItems}
         crossLinks={tooltipLinks}
-        show={!!elementsTruncated}
+        show={!!isTruncated}

Review Comment:
   Nit: `isTruncated` is a boolean so maybe we can skip the `!!`?



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org