Skip to content

Commit 9f2bec8

Browse files
authored
Fix TableLayout issues (#6711)
1 parent 4fc7017 commit 9f2bec8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/@react-spectrum/table/src/TableViewLayout.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export class TableViewLayout<T> extends TableLayout<T> {
3636

3737
if (this.isLoading) {
3838
// Add some margin around the loader to ensure that scrollbars don't flicker in and out.
39-
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);
39+
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);
4040
let loader = new LayoutInfo('loader', 'loader', rect);
4141
loader.parentKey = layoutInfo.key;
4242
loader.isSticky = children.length === 0;
@@ -71,6 +71,14 @@ export class TableViewLayout<T> extends TableLayout<T> {
7171
return res;
7272
}
7373

74+
protected buildCell(node: GridNode<T>, x: number, y: number): LayoutNode {
75+
let res = super.buildCell(node, x, y);
76+
if (node.column?.props.hideHeader) {
77+
res.layoutInfo.allowOverflow = true;
78+
}
79+
return res;
80+
}
81+
7482
protected getEstimatedRowHeight(): number {
7583
return super.getEstimatedRowHeight() + 1; // for bottom border
7684
}

0 commit comments

Comments
 (0)