Skip to content

Commit

Permalink
fix(data-table): also add ref to non-sortable branch in TableHeader (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
gmoehler and joshblack authored Jan 30, 2020
1 parent c13bcd0 commit 132dbfb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/react/src/components/DataTable/TableHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,12 @@ const TableHeader = React.forwardRef(function TableHeader(
) {
if (!isSortable) {
return (
<th {...rest} className={headerClassName} scope={scope} colSpan={colSpan}>
<th
{...rest}
className={headerClassName}
scope={scope}
colSpan={colSpan}
ref={ref}>
<span className={`${prefix}--table-header-label`}>{children}</span>
</th>
);
Expand Down

0 comments on commit 132dbfb

Please sign in to comment.