Skip to content

Commit

Permalink
test(table): fix no onSort test
Browse files Browse the repository at this point in the history
  • Loading branch information
jlopezcur committed Dec 28, 2023
1 parent a4a9d90 commit 7ebe2ea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/table/src/core/HeaderCell/HeaderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface HeaderCellProps {
offsetX: number;
children: React.ReactNode;
resizable?: boolean;
onSort?: (colDef) => void;
onSort?: (colDef: ColDef) => void;
}

export const HeaderCell: React.FC<HeaderCellProps> = ({
Expand All @@ -33,7 +33,9 @@ export const HeaderCell: React.FC<HeaderCellProps> = ({
density={density}
title={colDef.headerName}
onClick={() => {
onSort(colDef);
if (onSort) {
onSort(colDef);
}
}}
>
{children}
Expand Down

0 comments on commit 7ebe2ea

Please sign in to comment.