Skip to content

Commit 22d4f30

Browse files
committed
fix(AnalyticalTable): use global UI5 scrollbar styles
1 parent ba6dd6b commit 22d4f30

File tree

2 files changed

+3
-58
lines changed

2 files changed

+3
-58
lines changed

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

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,6 @@
148148
overflow-y: auto;
149149
scrollbar-width: none;
150150
box-sizing: border-box;
151-
-ms-overflow-style: none;
152-
153-
&::-webkit-scrollbar {
154-
width: 0 !important;
155-
height: 0 !important;
156-
display: none !important;
157-
}
158151
}
159152

160153
.alternateRowColor {
@@ -600,56 +593,14 @@
600593
background-color: var(--sapList_HeaderBackground);
601594
border-inline-start: 1px solid var(--sapList_BorderColor);
602595
margin-inline-start: -1px;
603-
width: calc(var(--sapScrollBar_Dimension) + 2px);
604596
}
605597
.scrollbar {
598+
box-sizing: border-box;
606599
overflow-y: auto;
607600
border-inline-end: var(--_ui5wcr-AnalyticalTable-OuterBorderInline);
608601
border-block-end: 1px solid var(--sapList_TableFooterBorder);
609602
border-inline-start: 1px solid var(--sapList_BorderColor);
610603
margin-inline-start: -1px;
611-
box-sizing: border-box;
612-
}
613-
614-
.scrollbar:global(.ui5-content-native-scrollbars) {
615-
background-color: var(--sapList_Background);
616-
width: calc(var(--sapScrollBar_Dimension) + 2px);
617-
}
618-
619-
.analyticalTableDelta:global(.ui5-content-native-scrollbars) {
620-
&::-webkit-scrollbar {
621-
background-color: var(--sapScrollBar_TrackColor);
622-
-webkit-border-start: var(--_ui5wcr_Scrollbar_Border);
623-
}
624-
625-
&::-webkit-scrollbar-thumb {
626-
border-radius: var(--_ui5wcr_Scrollbar_BorderRadius);
627-
background-color: var(--sapScrollBar_FaceColor);
628-
629-
&:hover {
630-
background-color: var(--sapScrollBar_FaceColor);
631-
}
632-
633-
&:horizontal {
634-
height: var(--sapScrollBar_Dimension);
635-
}
636-
637-
&:vertical {
638-
width: var(--sapScrollBar_Dimension);
639-
}
640-
}
641-
642-
&::-webkit-scrollbar-corner {
643-
background-color: var(--sapScrollBar_TrackColor);
644-
}
645-
646-
&::-webkit-scrollbar:horizontal {
647-
height: var(--sapScrollBar_Dimension);
648-
}
649-
650-
&::-webkit-scrollbar:vertical {
651-
width: var(--sapScrollBar_Dimension);
652-
}
653604
}
654605

655606
.verticalScroller {

packages/main/src/components/AnalyticalTable/scrollbars/VerticalScrollbar.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ interface VerticalScrollbarProps {
1010
tableRef: MutableRefObject<HTMLDivElement>;
1111
tableBodyHeight: number;
1212
scrollContainerRef: MutableRefObject<HTMLDivElement>;
13-
nativeScrollbar: boolean;
1413
classNames: ClassNames;
1514
}
1615

1716
export const VerticalScrollbar = forwardRef<HTMLDivElement, VerticalScrollbarProps>((props, ref) => {
18-
const { internalRowHeight, tableRef, tableBodyHeight, scrollContainerRef, nativeScrollbar, classNames } = props;
17+
const { internalRowHeight, tableRef, tableBodyHeight, scrollContainerRef, classNames } = props;
1918
const hasHorizontalScrollbar = tableRef?.current?.offsetWidth !== tableRef?.current?.scrollWidth;
2019
const horizontalScrollbarSectionStyles = clsx(hasHorizontalScrollbar && classNames.bottomSection);
2120

@@ -36,12 +35,7 @@ export const VerticalScrollbar = forwardRef<HTMLDivElement, VerticalScrollbarPro
3635
style={{
3736
height: tableRef.current ? `${tableBodyHeight}px` : '0',
3837
}}
39-
className={clsx(
40-
classNames.scrollbar,
41-
nativeScrollbar
42-
? 'ui5-content-native-scrollbars'
43-
: `ui5-content-native-scrollbars ${classNames.analyticalTableDelta}`,
44-
)}
38+
className={clsx(classNames.scrollbar)}
4539
data-component-name="AnalyticalTableVerticalScrollbar"
4640
tabIndex={-1}
4741
>

0 commit comments

Comments
 (0)