Skip to content

Commit e0106a7

Browse files
authored
fix(AnalyticalTable): prevent style warning when scrollbar is visible (#813)
closes #811
1 parent 836ff67 commit e0106a7

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ export const VerticalScrollbar = forwardRef((props: VerticalScrollbarProps, ref:
2323
style={{
2424
height: `${internalRowHeight}px`,
2525
boxSizing: 'border-box',
26-
borderLeft: 'none',
27-
border: `1px solid ${ThemingParameters.sapList_BorderColor}`,
26+
borderTop: `1px solid ${ThemingParameters.sapList_BorderColor}`,
27+
borderRight: `1px solid ${ThemingParameters.sapList_BorderColor}`,
28+
borderBottom: `1px solid ${ThemingParameters.sapList_BorderColor}`,
2829
backgroundColor: ThemingParameters.sapList_HeaderBackground
2930
}}
3031
/>
@@ -33,26 +34,31 @@ export const VerticalScrollbar = forwardRef((props: VerticalScrollbarProps, ref:
3334
style={{
3435
overflowY: 'auto',
3536
height: tableRef.current ? `${tableRef.current.clientHeight - internalRowHeight}px` : '0',
36-
border: `1px solid ${ThemingParameters.sapList_BorderColor}`,
37-
borderTop: 'none',
38-
borderLeft: 'none',
37+
borderRight: `1px solid ${ThemingParameters.sapList_BorderColor}`,
38+
borderBottom: `1px solid ${ThemingParameters.sapList_BorderColor}`,
3939
boxSizing: 'border-box'
4040
}}
4141
onScroll={handleVerticalScrollBarScroll}
4242
className={GlobalStyleClasses.sapScrollBar}
4343
>
44-
<div style={{ height: `${Math.max(minRows, rows.length) * internalRowHeight}px`, width: '1px' }} />
44+
<div
45+
style={{
46+
height: `${Math.max(minRows, rows.length) * internalRowHeight}px`,
47+
width: '1px'
48+
}}
49+
/>
4550
</div>
4651
<div
4752
style={{
4853
flexGrow: 1,
4954
backgroundColor: ThemingParameters.sapList_HeaderBackground,
50-
border: hasHorizontalScrollbar ? `1px solid ${ThemingParameters.sapList_BorderColor}` : 'none',
51-
borderTop: 'none',
52-
borderLeft: 'none',
55+
borderRight: hasHorizontalScrollbar ? `1px solid ${ThemingParameters.sapList_BorderColor}` : 'none',
56+
borderBottom: hasHorizontalScrollbar ? `1px solid ${ThemingParameters.sapList_BorderColor}` : 'none',
5357
boxSizing: 'border-box'
5458
}}
5559
/>
5660
</FlexBox>
5761
);
5862
});
63+
64+
VerticalScrollbar.displayName = 'VerticalScrollbar';

0 commit comments

Comments
 (0)