Skip to content

Commit

Permalink
chore: migrate vui-source changes to v3.6.0 (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrderyk authored Dec 18, 2024
1 parent 029a855 commit 96f5fe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/docs/pages/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export const Table = () => {
return "Name";
}
},
testId: "nameColumn",
render: (person: Person) => (
<div>
<div>
Expand Down
5 changes: 3 additions & 2 deletions src/lib/components/table/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type Column<T> = {
header: TableHeaderCellProps["header"];
render?: (row: T, rowIndex: number) => React.ReactNode;
className?: string;
testId?: string;
};

type Props<T> = {
Expand Down Expand Up @@ -190,10 +191,10 @@ export const VuiTable = <T extends Row>({

{/* Row info */}
{columns.map((column) => {
const { name, render, className } = column;
const { name, render, className, testId } = column;

return (
<td key={name} className={className}>
<td key={name} className={className} data-testid={testId}>
<VuiTableCell>{render ? render(row, rowIndex) : row[column.name]}</VuiTableCell>
</td>
);
Expand Down

0 comments on commit 96f5fe9

Please sign in to comment.