Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions src/lib/MassiveTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,11 @@ export function MassiveTable<Row = unknown>(props: MassiveTableProps<Row>) {
);
})}
{draggingColIndex !== null && (
<div className={classes.overlayLayer} aria-hidden>
<div
className={classes.overlayLayer}
aria-hidden
style={{ position: 'absolute', inset: 0, pointerEvents: 'none', zIndex: 4 }}
>
{overlayMeta.widths.map((w, j) => {
const isDataCol = hasInlineGroup ? j > 0 : true;
const dataIdx = hasInlineGroup ? j - 1 : j;
Expand All @@ -987,14 +991,24 @@ export function MassiveTable<Row = unknown>(props: MassiveTableProps<Row>) {
<div
key={`hdr-ov:${hasInlineGroup && j === 0 ? '__inline' : JSON.stringify(columnsOrdered[dataIdx]?.path)}`}
className={classes.overlayCol}
style={{ left: overlayMeta.lefts[j], width: w }}
style={{
position: 'absolute',
top: 0,
bottom: 0,
left: overlayMeta.lefts[j],
width: w,
background: 'var(--massive-table-dim-overlay, rgba(0, 0, 0, 0.1))',
}}
/>
);
})}
</div>
)}
</div>
<div className={classes.rows} style={{ height: contentHeight, width: totalWidth }}>
<div
className={classes.rows}
style={{ height: contentHeight, width: totalWidth, position: 'relative' }}
>
{Array.from({ length: Math.max(0, end - start) }).map((_, i) => {
const rowIndex = start + i;
const row = cache.rows[rowIndex];
Expand Down Expand Up @@ -1204,7 +1218,11 @@ export function MassiveTable<Row = unknown>(props: MassiveTableProps<Row>) {
);
})}
{draggingColIndex !== null && (
<div className={classes.overlayLayer} aria-hidden>
<div
className={classes.overlayLayer}
aria-hidden
style={{ position: 'absolute', inset: 0, pointerEvents: 'none', zIndex: 4 }}
>
{overlayMeta.widths.map((w, j) => {
const isDataCol = hasInlineGroup ? j > 0 : true;
const dataIdx = hasInlineGroup ? j - 1 : j;
Expand All @@ -1214,7 +1232,14 @@ export function MassiveTable<Row = unknown>(props: MassiveTableProps<Row>) {
<div
key={`row-ov:${hasInlineGroup && j === 0 ? '__inline' : JSON.stringify(columnsOrdered[dataIdx]?.path)}`}
className={classes.overlayCol}
style={{ left: overlayMeta.lefts[j], width: w, height: '100%' }}
style={{
position: 'absolute',
top: 0,
bottom: 0,
left: overlayMeta.lefts[j],
width: w,
background: 'var(--massive-table-dim-overlay, rgba(0, 0, 0, 0.1))',
}}
/>
);
})}
Expand Down
14 changes: 8 additions & 6 deletions src/lib/styles/base.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
Arial,
"Apple Color Emoji",
"Segoe UI Emoji";
font-size: 13px;
}

.viewport {
Expand All @@ -44,6 +43,10 @@
scrollbar-color: var(--massive-table-scrollbar-thumb) var(--massive-table-scrollbar-track);
}

.viewport button {
font-size: 100%;
}

/* Scrollbar polish */
.viewport::-webkit-scrollbar {
height: 10px;
Expand Down Expand Up @@ -76,6 +79,10 @@
border-bottom: 1px solid var(--massive-table-border);
box-shadow: var(--massive-table-header-shadow);
}
.groupBar ul {
padding: 0;
margin: 0;
}
.groupBarOver {
outline: 2px dashed var(--massive-table-border);
outline-offset: -4px;
Expand Down Expand Up @@ -113,7 +120,6 @@
background: transparent;
color: inherit;
border-radius: 6px;
font-size: 11px;
line-height: 1;
padding: 2px 6px;
}
Expand Down Expand Up @@ -210,7 +216,6 @@
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 11px;
opacity: 0.85;
}
.headerGroupBtn {
Expand All @@ -219,7 +224,6 @@
background: transparent;
color: inherit;
border-radius: 6px;
font-size: 12px;
line-height: 1;
padding: 2px 6px;
cursor: pointer;
Expand All @@ -232,7 +236,6 @@
}
.headerHint {
margin-left: auto;
font-size: 11px;
opacity: 0.45;
}
.resizeGrip {
Expand Down Expand Up @@ -315,7 +318,6 @@
background: transparent;
color: inherit;
border-radius: 6px;
font-size: 12px;
width: 22px;
height: 22px;
}
Expand Down