Skip to content

Commit c4a49e4

Browse files
authoredJul 11, 2024··
fix(AnalyticalTable): fix custom header alignment (#6068)
1 parent a7b90eb commit c4a49e4

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed
 

‎packages/main/src/components/AnalyticalTable/AnalyticalTable.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ import * as ComponentStories from './AnalyticalTable.stories';
5757
// set filter
5858
column.setFilter(event.detail.selectedOption.getAttribute('value'));
5959
// close popover
60-
popoverRef.current.close();
60+
popoverRef.current.open = false;
6161
};
6262
return (
6363
<Select

‎packages/main/src/components/AnalyticalTable/AnalyticalTable.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const meta = {
6969
// set filter
7070
column.setFilter(event.detail.selectedOption.getAttribute('value'));
7171
// close popover
72-
popoverRef.current.close();
72+
popoverRef.current.open = false;
7373
};
7474
return (
7575
<Select onChange={handleChange} style={{ width: '100%' }}>

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

+12
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@
2929
overflow-x: hidden;
3030
overflow-y: hidden;
3131
box-sizing: border-box;
32+
33+
& > span {
34+
width: 100%;
35+
text-overflow: ellipsis;
36+
white-space: nowrap;
37+
overflow-x: hidden;
38+
overflow-y: hidden;
39+
}
3240
}
3341

3442
.text {
@@ -44,6 +52,10 @@
4452
position: absolute;
4553
color: var(--sapContent_IconColor);
4654
inset-inline-end: 0.5rem;
55+
56+
& > [ui5-icon]:not(:first-child) {
57+
margin-inline-start: 0.125rem;
58+
}
4759
}
4860

4961
.selectAllCheckBoxContainer {

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,9 @@ export const ColumnHeader = (props: ColumnHeaderProps) => {
119119
return style;
120120
}
121121

122-
if (margin > 0) margin += 0.5;
122+
if (margin > 0) {
123+
margin += 0.625;
124+
}
123125

124126
style.marginInlineEnd = `${margin}rem`;
125127

@@ -215,7 +217,14 @@ export const ColumnHeader = (props: ColumnHeaderProps) => {
215217
{children}
216218
</Text>
217219
) : (
218-
children
220+
<span
221+
title={tooltip}
222+
style={textStyle}
223+
className={classNames.text}
224+
data-component-name={`AnalyticalTableHeaderContentContainer-${columnId}`}
225+
>
226+
{children}
227+
</span>
219228
)}
220229
<div
221230
className={classNames.iconContainer}

0 commit comments

Comments
 (0)
Please sign in to comment.