Skip to content

Commit

Permalink
fix: remove padding for custom data table header (#19058)
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjae-lee authored Feb 3, 2025
1 parent 4475509 commit 93da9c5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/features/data-table/components/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ const TableHeadLabel = ({ header }: { header: Header<any, any> }) => {
const canSort = header.column.getCanSort();

if (!canSort && !canHide) {
return (
<div
className="truncate px-2 py-1"
title={
typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : undefined
}>
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
</div>
);
if (typeof header.column.columnDef.header === "string") {
return (
<div className="truncate px-2 py-1" title={header.column.columnDef.header}>
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
</div>
);
} else {
return header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext());
}
}

return (
Expand Down

0 comments on commit 93da9c5

Please sign in to comment.