Skip to content

Commit 7162aeb

Browse files
authored
fix: paginated tables not working in safari (#1231)
1 parent d95ea95 commit 7162aeb

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/components/PaginatedTable/PaginatedTable.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
&__head {
4141
z-index: 1;
4242
@include sticky-top();
43+
44+
&-row {
45+
display: table;
46+
}
4347
}
4448

4549
&__sort-icon-container {
@@ -165,4 +169,8 @@
165169
&__head-cell-wrapper:hover > &__resize-handler {
166170
visibility: visible;
167171
}
172+
173+
&__table-chunk {
174+
display: block;
175+
}
168176
}

src/components/PaginatedTable/TableChunk.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {useAutoRefreshInterval} from '../../utils/hooks';
77
import {ResponseError} from '../Errors/ResponseError';
88

99
import {EmptyTableRow, LoadingTableRow, TableRow} from './TableRow';
10+
import {b} from './shared';
1011
import type {Column, FetchData, GetRowClassName, SortParams} from './types';
1112

1213
const DEBOUNCE_TIMEOUT = 200;
@@ -142,7 +143,12 @@ export const TableChunk = <T, F>({
142143
const chunkHeight = dataLength ? dataLength * rowHeight : limit * rowHeight;
143144

144145
return (
145-
<tbody ref={ref} id={id.toString()} style={{height: `${chunkHeight}px`}}>
146+
<tbody
147+
className={b('table-chunk')}
148+
ref={ref}
149+
id={id.toString()}
150+
style={{height: `${chunkHeight}px`}}
151+
>
146152
{renderContent()}
147153
</tbody>
148154
);

src/components/PaginatedTable/TableHead.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export const TableHead = <T,>({
194194
const renderTableHead = () => {
195195
return (
196196
<thead className={b('head')}>
197-
<tr>
197+
<tr className={b('head-row')}>
198198
{columns.map((column) => {
199199
const sortOrder =
200200
sortParams.columnId === column.name ? sortParams.sortOrder : undefined;

0 commit comments

Comments
 (0)