From 96f5fe9fb170139d6c33bc81b0b302c80dc025b5 Mon Sep 17 00:00:00 2001 From: mrderyk Date: Wed, 18 Dec 2024 10:25:53 -0800 Subject: [PATCH] chore: migrate vui-source changes to v3.6.0 (#188) --- src/docs/pages/table/Table.tsx | 1 + src/lib/components/table/Table.tsx | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/docs/pages/table/Table.tsx b/src/docs/pages/table/Table.tsx index f571dce..eb87547 100644 --- a/src/docs/pages/table/Table.tsx +++ b/src/docs/pages/table/Table.tsx @@ -92,6 +92,7 @@ export const Table = () => { return "Name"; } }, + testId: "nameColumn", render: (person: Person) => (
diff --git a/src/lib/components/table/Table.tsx b/src/lib/components/table/Table.tsx index 3e4545a..4027912 100644 --- a/src/lib/components/table/Table.tsx +++ b/src/lib/components/table/Table.tsx @@ -33,6 +33,7 @@ type Column = { header: TableHeaderCellProps["header"]; render?: (row: T, rowIndex: number) => React.ReactNode; className?: string; + testId?: string; }; type Props = { @@ -190,10 +191,10 @@ export const VuiTable = ({ {/* Row info */} {columns.map((column) => { - const { name, render, className } = column; + const { name, render, className, testId } = column; return ( - + {render ? render(row, rowIndex) : row[column.name]} );