This is an automated email from the ASF dual-hosted git repository.

msyavuz pushed a commit to branch msyavuz/refactor/use-ant-tables
in repository https://gitbox.apache.org/repos/asf/superset.git

commit fe22bc5855b550ee7316423f69a30ef224d49100
Author: Mehmet Salih Yavuz <[email protected]>
AuthorDate: Tue Apr 1 21:14:56 2025 +0300

    chore: pass rest of the table props
---
 superset-frontend/src/components/Table/index.tsx   |  5 ++++-
 .../src/components/TableCollection/index.tsx       | 22 ++++++++++++++--------
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/superset-frontend/src/components/Table/index.tsx 
b/superset-frontend/src/components/Table/index.tsx
index fef01289f1..450c164e86 100644
--- a/superset-frontend/src/components/Table/index.tsx
+++ b/superset-frontend/src/components/Table/index.tsx
@@ -53,7 +53,7 @@ export enum TableSize {
   Large = 'large',
 }
 
-export interface TableProps<RecordType> {
+export interface TableProps<RecordType> extends AntTableProps<RecordType> {
   /**
    * Data that will populate the each row and map to the column key.
    */
@@ -260,6 +260,7 @@ export function Table<RecordType extends object>(
     onRow,
     allowHTML = false,
     childrenColumnName,
+    ...rest
   } = props;
 
   const wrapperRef = useRef<HTMLDivElement | null>(null);
@@ -401,6 +402,7 @@ export function Table<RecordType extends object>(
           {...sharedProps}
           rowSelection={selectionTypeValue !== null ? rowSelection : undefined}
           sticky={sticky}
+          {...rest}
         />
       )}
       {virtualize && (
@@ -415,6 +417,7 @@ export function Table<RecordType extends object>(
             }),
           }}
           allowHTML={allowHTML}
+          {...rest}
         />
       )}
     </div>
diff --git a/superset-frontend/src/components/TableCollection/index.tsx 
b/superset-frontend/src/components/TableCollection/index.tsx
index 0f6c2c79ed..ffd64971c2 100644
--- a/superset-frontend/src/components/TableCollection/index.tsx
+++ b/superset-frontend/src/components/TableCollection/index.tsx
@@ -33,11 +33,17 @@ interface TableCollectionProps {
   columnsForWrapText?: string[];
 }
 
-export default memo(({ columns, rows, loading }: TableCollectionProps) => (
-  <Table
-    loading={loading}
-    columns={mapColumns(columns)}
-    data={mapRows(rows)}
-    size={TableSize.Middle}
-  />
-));
+export default memo(({ columns, rows, loading }: TableCollectionProps) => {
+  const mappedColumns = mapColumns(columns);
+  const mappedRows = mapRows(rows);
+  console.log({ columns, mappedColumns, rows, mappedRows });
+  return (
+    <Table
+      loading={loading}
+      columns={mappedColumns}
+      data={mappedRows}
+      size={TableSize.Middle}
+      pagination={false}
+    />
+  );
+});

Reply via email to