New table column order
Table groups and colouring
Chance of rain column
This commit is contained in:
fraxle
2026-05-24 11:41:13 +01:00
parent 0853b9852b
commit d7bfaf11b6
6 changed files with 282 additions and 194 deletions
+2 -2
View File
@@ -123,7 +123,7 @@ export function useTableScroll({
const bodyScroll = bodyScrollRef.current;
if (!headTable || !bodyTable || !bodyScroll) return;
const bodyRow = bodyTable.querySelector('tbody tr');
const headRow = headTable.querySelector('thead tr');
const headRow = headTable.querySelector('thead tr:last-child');
if (!bodyRow || !headRow) return;
const headCells = Array.from(headRow.children);
const bodyCells = Array.from(bodyRow.children);
@@ -178,7 +178,7 @@ export function useTableScroll({
// Step 4: restore the CSS-defined table-layout: fixed so the
// explicit cell widths we apply below are honoured by the browser
// (not redistributed by the auto-layout algorithm).
headTable.style.tableLayout = '';
headTable.style.tableLayout = 'auto';
bodyTable.style.tableLayout = '';
// Step 5: apply the final width to both head and body cells.