diff --git a/packages/@react-spectrum/table/src/TableViewLayout.ts b/packages/@react-spectrum/table/src/TableViewLayout.ts index 483d39a0b42..400ce240c27 100644 --- a/packages/@react-spectrum/table/src/TableViewLayout.ts +++ b/packages/@react-spectrum/table/src/TableViewLayout.ts @@ -36,7 +36,7 @@ export class TableViewLayout extends TableLayout { if (this.isLoading) { // Add some margin around the loader to ensure that scrollbars don't flicker in and out. - let rect = new Rect(40, Math.max(layoutInfo.rect.maxY, 40), (width || this.virtualizer.visibleRect.width) - 80, children.length === 0 ? this.virtualizer.visibleRect.height - 80 : 60); + let rect = new Rect(40, children.length === 0 ? 40 : layoutInfo.rect.maxY, (width || this.virtualizer.visibleRect.width) - 80, children.length === 0 ? this.virtualizer.visibleRect.height - 80 : 60); let loader = new LayoutInfo('loader', 'loader', rect); loader.parentKey = layoutInfo.key; loader.isSticky = children.length === 0; @@ -71,6 +71,14 @@ export class TableViewLayout extends TableLayout { return res; } + protected buildCell(node: GridNode, x: number, y: number): LayoutNode { + let res = super.buildCell(node, x, y); + if (node.column?.props.hideHeader) { + res.layoutInfo.allowOverflow = true; + } + return res; + } + protected getEstimatedRowHeight(): number { return super.getEstimatedRowHeight() + 1; // for bottom border }