Skip to content

Commit 96dd7db

Browse files
committed
html semantics in better shape, need to test if renderExpanded is essential
1 parent 3dfe414 commit 96dd7db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/gamut/src/List/ListRow.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,16 @@ export const ListRow = forwardRef<HTMLLIElement, ListRowProps>(
6262
const { listType, rowBreakpoint, scrollable, variant, ...rowConfig } =
6363
useListContext();
6464
const isOl = listType === 'ol';
65+
const isTable = listType === 'table';
6566
const { onClick, role, tabIndex, ...rowProps } = rest;
6667
const wrapperProps =
67-
!renderExpanded && !onClick
68+
(!renderExpanded && !onClick) || isTable
6869
? { ...rowConfig, ...rowProps }
6970
: { spacing: keepSpacingWhileExpanded ? rowConfig.spacing : undefined };
7071
let content = children;
7172
const renderNumbering = isOl && renderExpanded === undefined && !onClick;
7273

73-
if (renderExpanded || Boolean(onClick)) {
74+
if (renderExpanded || Boolean(onClick) || !isTable) {
7475
content = (
7576
<RowEl
7677
as="div"

0 commit comments

Comments
 (0)