justinpark commented on code in PR #29242:
URL: https://github.com/apache/superset/pull/29242#discussion_r1640231905


##########
superset-frontend/src/components/Chart/DrillBy/DrillByMenuItems.tsx:
##########
@@ -253,20 +323,23 @@ export const DrillByMenuItems = ({
           ) : filteredColumns.length ? (
             <div
               css={css`
-                max-height: ${MAX_SUBMENU_HEIGHT}px;
-                overflow: auto;
+                height: ${MAX_SUBMENU_HEIGHT}px;
               `}
             >
-              {filteredColumns.map(column => (
-                <MenuItemWithTruncation
-                  key={`drill-by-item-${column.column_name}`}
-                  tooltipText={column.verbose_name || column.column_name}
-                  {...rest}
-                  onClick={e => handleSelection(e, column)}
-                >
-                  {column.verbose_name || column.column_name}
-                </MenuItemWithTruncation>
-              ))}
+              <AutoSizer>
+                {({ height, width }: { height: number; width: number }) => (
+                  <List
+                    width={width}
+                    height={height}

Review Comment:
   Since the height is already fixed, what do you think about locking the 
height value into the same variable to improve resize performance?
   Additionally I would also like to avoid using the autosizer if we can set 
the width to a specific size, since there are numerous callback functions 
linked to resize events within the charts on the current dashboard.
   
   ```suggestion
                   {({ width }: { width: number }) => (
                     <List
                       width={width}
                       height={MAX_SUBMENU_HEIGHT}
   ```



-- 
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-unsubscr...@superset.apache.org

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


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

Reply via email to