michael-s-molina commented on code in PR #22135:
URL: https://github.com/apache/superset/pull/22135#discussion_r1025411059


##########
superset-frontend/src/components/Table/index.tsx:
##########
@@ -292,32 +319,51 @@ export function Table(props: TableProps) {
      * The exclusion from the effect dependencies is intentional and should 
not be modified
      */
     // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [wrapperRef, reorderable, resizable, interactiveTableUtils]);
+  }, [wrapperRef, reorderable, resizable, virtualize, interactiveTableUtils]);
 
   const theme = useTheme();
+  const paginationSettings = usePagination
+    ? {
+        hideOnSinglePage: true,
+        pageSize,
+        pageSizeOptions,
+        onShowSizeChange: (page: number, size: number) => setPageSize(size),
+      }
+    : false;

Review Comment:
   ```suggestion
     const paginationSettings = usePagination
       ? {
           hideOnSinglePage: true,
           pageSize,
           pageSizeOptions,
           onShowSizeChange: (page: number, size: number) => setPageSize(size),
         }
       : false;
       
     const sharedProps = {
       loading: { spinning: loading ?? false, indicator: <Loading /> },
       hasData: hideData ? false : data,
       columns: derivedColumns,
       dataSource: hideData ? [undefined] : data,
       size,
       pagination: paginationSettings,
       locale: mergedLocale,
     };
   ```



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