Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/dataDisplay/Table/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type TableHeader = {
id: string;
alignment?: TableAlignment;
label: string;
hideSortIcon?: boolean;
};

type RowCells = {
Expand Down Expand Up @@ -134,7 +135,8 @@ export const Table = ({
<TableSortLabel
active={sortedByHeaderId === header.id}
direction={sortDirection}
onClick={() => onHeaderClick(header.id)}>
onClick={() => onHeaderClick(header.id)}
hideSortIcon={header.hideSortIcon}>
{header.label}
</TableSortLabel>
) : (
Expand Down
2 changes: 2 additions & 0 deletions src/dataDisplay/Table/table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const headerCells = [
{
id: 'col1',
label: 'col1',
hideSortIcon: true,
},
{
id: 'col2',
Expand All @@ -26,6 +27,7 @@ const headerCells = [
id: 'col3',
alignment: TableAlignment.right,
label: 'col3',
hideSortIcon: true,
},
];

Expand Down
20 changes: 0 additions & 20 deletions tests/dataDisplay/Table/__snapshots__/table.stories.storyshot
Original file line number Diff line number Diff line change
Expand Up @@ -5170,16 +5170,6 @@ exports[`Storyshots Data Display/Table Sortable 1`] = `
tabIndex={0}
>
col1
<svg
aria-hidden={true}
className="MuiSvgIcon-root MuiTableSortLabel-icon MuiTableSortLabel-iconDirectionAsc"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"
/>
</svg>
</span>
</th>
<th
Expand Down Expand Up @@ -5242,16 +5232,6 @@ exports[`Storyshots Data Display/Table Sortable 1`] = `
tabIndex={0}
>
col3
<svg
aria-hidden={true}
className="MuiSvgIcon-root MuiTableSortLabel-icon MuiTableSortLabel-iconDirectionAsc"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"
/>
</svg>
</span>
</th>
</tr>
Expand Down