Skip to content

Commit db2cac1

Browse files
authored
Wrap table cells to be semantically correct (#578)
1 parent 6539bfd commit db2cac1

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/components/v2/Table/index.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,6 @@ export const Table = ({
129129
onClick={
130130
rowOnClick && ((e: React.MouseEvent<HTMLDivElement>) => rowOnClick(e, row))
131131
}
132-
component={
133-
getRowHref
134-
? ({ children, ...props }) => (
135-
<Link {...props} to={getRowHref(row)}>
136-
{children}
137-
</Link>
138-
)
139-
: 'tr'
140-
}
141132
>
142133
{row.map(({ key, render, align }: ITableRowProps) => {
143134
const cellContent = render();
@@ -149,7 +140,7 @@ export const Table = ({
149140
title={cellTitle}
150141
align={align}
151142
>
152-
{cellContent}
143+
{getRowHref ? <Link to={getRowHref(row)}>{cellContent}</Link> : cellContent}
153144
</TableCell>
154145
);
155146
})}

0 commit comments

Comments
 (0)