TableNG: Follow-up style fixes (#107274)

* open cell inspect in code mode for JSON panels

* increase opacity of TableCellActions background for legibility in overlap cases

* fix nested grid width calculation

* fix 'jumping' on hover overflow

* route transparency through (needs a scenes update)

* base row hover color on transparency

* update the colors for table

* remove console.log

* reinstate header toggle for nested row transformation

* fix #59474 - graceful handling when subtable has no rows

* fix i18n

* use TABLE.LINE_HEIGHT

* change nestedData back to const
This commit is contained in:
Paul Marbach
2025-07-09 14:54:48 -04:00
committed by GitHub
parent ebe494c7e6
commit a63a9357bb
7 changed files with 55 additions and 28 deletions

View File

@ -503,9 +503,13 @@ export function useRowHeight({
return 0;
}
// Ensure we have a minimum height (defaultHeight) for the nested table even if data is empty
const rowCount = row.data?.length ?? 0;
return Math.max(defaultHeight, defaultHeight * rowCount + headerHeight);
if (rowCount === 0) {
return TABLE.NESTED_NO_DATA_HEIGHT + TABLE.CELL_PADDING * 2;
}
const nestedHeaderHeight = row.data?.meta?.custom?.noHeader ? 0 : defaultHeight;
return Math.max(defaultHeight, defaultHeight * rowCount + nestedHeaderHeight + TABLE.CELL_PADDING * 2);
}
// regular rows
@ -519,7 +523,6 @@ export function useRowHeight({
fields,
hasNestedFrames,
hasWrappedCols,
headerHeight,
maxWrapCellOptions,
colWidths,
]);