Skip to content

Commit b5859ed

Browse files
authored
fix(AnalyticalTable): update column header icons to align with latest specs (#6593)
1 parent 06a88f5 commit b5859ed

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

packages/main/src/components/AnalyticalTable/ColumnHeader/ColumnHeader.module.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,8 @@
6262
display: flex;
6363
justify-content: center;
6464
}
65+
66+
.icon {
67+
height: 0.8125rem;
68+
width: 0.8125rem;
69+
}

packages/main/src/components/AnalyticalTable/ColumnHeader/index.tsx

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { VirtualItem, Virtualizer } from '@tanstack/react-virtual';
2+
import IconDesign from '@ui5/webcomponents/dist/types/IconDesign.js';
23
import iconFilter from '@ui5/webcomponents-icons/dist/filter.js';
34
import iconGroup from '@ui5/webcomponents-icons/dist/group-2.js';
45
import iconSortAscending from '@ui5/webcomponents-icons/dist/sort-ascending.js';
@@ -108,16 +109,16 @@ export const ColumnHeader = (props: ColumnHeaderProps) => {
108109
style.textAlign = column.hAlign.toLowerCase();
109110
}
110111

111-
if (column.isSorted) margin++;
112-
if (column.isGrouped) margin++;
113-
if (isFiltered) margin++;
112+
if (column.isSorted) margin += 0.8125;
113+
if (column.isGrouped) margin += 0.8125;
114+
if (isFiltered) margin += 0.8125;
114115

115116
if (margin === 0) {
116117
return style;
117118
}
118119

119120
if (margin > 0) {
120-
margin += 0.625;
121+
margin += 0.75;
121122
}
122123

123124
style.marginInlineEnd = `${margin}rem`;
@@ -234,11 +235,20 @@ export const ColumnHeader = (props: ColumnHeaderProps) => {
234235
className={classNames.iconContainer}
235236
data-component-name={`AnalyticalTableHeaderIconsContainer-${columnId}`}
236237
>
237-
{isFiltered && <Icon name={iconFilter} aria-hidden />}
238+
{isFiltered && (
239+
<Icon design={IconDesign.NonInteractive} name={iconFilter} aria-hidden className={classNames.icon} />
240+
)}
238241
{column.isSorted && (
239-
<Icon name={column.isSortedDesc ? iconSortDescending : iconSortAscending} aria-hidden />
242+
<Icon
243+
design={IconDesign.NonInteractive}
244+
name={column.isSortedDesc ? iconSortDescending : iconSortAscending}
245+
aria-hidden
246+
className={classNames.icon}
247+
/>
248+
)}
249+
{column.isGrouped && (
250+
<Icon design={IconDesign.NonInteractive} name={iconGroup} aria-hidden className={classNames.icon} />
240251
)}
241-
{column.isGrouped && <Icon name={iconGroup} aria-hidden />}
242252
</div>
243253
</div>
244254
{hasPopover &&

0 commit comments

Comments
 (0)