@@ -29,6 +29,21 @@ const MainContainer = styled.div<{
29
29
visibility: hidden !important;
30
30
}
31
31
` }
32
+
33
+ /* Ant Table virtualization scrollbar - match SimpleBar colors */
34
+ .ant-table-tbody-virtual-scrollbar-thumb {
35
+ background: rgba(0,0,0,0.35) !important;
36
+ border-radius: 6px;
37
+ transition: background .2s ease;
38
+ }
39
+
40
+ .ant-table-tbody-virtual-scrollbar-horizontal {
41
+ display: ${ ( props ) => ( props . $showHorizontalScrollbar ) ? 'block' : 'none' } !important;
42
+ }
43
+
44
+ .ant-table-tbody-virtual-scrollbar-vertical {
45
+ display: ${ ( props ) => ( props . $showVerticalScrollbar ) ? 'block' : 'none' } !important;
46
+ }
32
47
33
48
` ;
34
49
@@ -61,13 +76,6 @@ const TableSection = styled.div<{
61
76
} > `
62
77
min-height: 0;
63
78
min-width: 0;
64
-
65
- /* Ant Table virtualization scrollbar - match SimpleBar colors */
66
- .ant-table-tbody-virtual-scrollbar-thumb {
67
- background: rgba(0,0,0,0.35) !important;
68
- border-radius: 6px;
69
- transition: background .2s ease;
70
- }
71
79
` ;
72
80
73
81
const SimpleBarWrapper = styled ( SimpleBar ) `
@@ -120,7 +128,6 @@ export const TableContainer: React.FC<TableContainerProps> = ({
120
128
showHorizontalScrollbar,
121
129
virtual
122
130
} ) => {
123
- const hideScrollbar = ! showHorizontalScrollbar && ! showVerticalScrollbar ;
124
131
125
132
React . useEffect ( ( ) => {
126
133
// eslint-disable-next-line no-console
@@ -141,19 +148,6 @@ export const TableContainer: React.FC<TableContainerProps> = ({
141
148
) }
142
149
143
150
< TableSection $mode = { mode } >
144
- { hideScrollbar ? (
145
- /* No scrollbars - render without SimpleBar */
146
- < >
147
- { ! stickyToolbar && toolbarPosition === 'above' && showToolbar && (
148
- < DefaultToolbar > { toolbar } </ DefaultToolbar >
149
- ) }
150
- { children }
151
- { ! stickyToolbar && toolbarPosition === 'below' && showToolbar && (
152
- < DefaultToolbar > { toolbar } </ DefaultToolbar >
153
- ) }
154
- </ >
155
- ) : (
156
- /* Scrollbars enabled - use SimpleBar */
157
151
< SimpleBarWrapper className = "simplebar-wrapper" autoHide = { true } >
158
152
{ ! stickyToolbar && toolbarPosition === 'above' && showToolbar && (
159
153
< DefaultToolbar > { toolbar } </ DefaultToolbar >
@@ -163,7 +157,6 @@ export const TableContainer: React.FC<TableContainerProps> = ({
163
157
< DefaultToolbar > { toolbar } </ DefaultToolbar >
164
158
) }
165
159
</ SimpleBarWrapper >
166
- ) }
167
160
</ TableSection >
168
161
169
162
{ /* Sticky below toolbar - always visible */ }
0 commit comments