Skip to content

Commit 132dbfb

Browse files
gmoehlerjoshblack
andauthored
fix(data-table): also add ref to non-sortable branch in TableHeader (#5204)
* fix: also add ref to non sortable branch * Update packages/react/src/components/DataTable/TableHeader.js Co-Authored-By: Josh Black <josh@josh.black> * fix: reformat file Co-authored-by: Josh Black <josh@josh.black>
1 parent c13bcd0 commit 132dbfb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/react/src/components/DataTable/TableHeader.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ const TableHeader = React.forwardRef(function TableHeader(
6464
) {
6565
if (!isSortable) {
6666
return (
67-
<th {...rest} className={headerClassName} scope={scope} colSpan={colSpan}>
67+
<th
68+
{...rest}
69+
className={headerClassName}
70+
scope={scope}
71+
colSpan={colSpan}
72+
ref={ref}>
6873
<span className={`${prefix}--table-header-label`}>{children}</span>
6974
</th>
7075
);

0 commit comments

Comments
 (0)