fix: height on grid results (#12558)

This commit is contained in:
Beto Dealmeida 2021-01-15 13:54:55 -08:00 committed by Ville Brofeldt
parent 5786513cbb
commit 147f750829
No known key found for this signature in database
GPG Key ID: 7E7B51D2816B1A16
1 changed files with 38 additions and 36 deletions

View File

@ -463,43 +463,45 @@ export default class FilterableTable extends PureComponent<
// fix height of filterable table
return (
<ScrollSync>
{({ onScroll, scrollTop }) => (
<div
style={{ height }}
className="filterable-table-container Table"
data-test="filterable-table-container"
ref={this.container}
>
<div className="LeftColumn">
<Grid
cellRenderer={this.renderGridCellHeader}
columnCount={orderedColumnKeys.length}
columnWidth={getColumnWidth}
height={rowHeight}
rowCount={1}
rowHeight={rowHeight}
scrollTop={scrollTop}
width={this.totalTableWidth}
/>
<StyledFilterableTable>
<ScrollSync>
{({ onScroll, scrollTop }) => (
<div
style={{ height }}
className="filterable-table-container Table"
data-test="filterable-table-container"
ref={this.container}
>
<div className="LeftColumn">
<Grid
cellRenderer={this.renderGridCellHeader}
columnCount={orderedColumnKeys.length}
columnWidth={getColumnWidth}
height={rowHeight}
rowCount={1}
rowHeight={rowHeight}
scrollTop={scrollTop}
width={this.totalTableWidth}
/>
</div>
<div className="RightColumn">
<Grid
cellRenderer={this.renderGridCell}
columnCount={orderedColumnKeys.length}
columnWidth={getColumnWidth}
height={totalTableHeight - rowHeight}
onScroll={onScroll}
overscanColumnCount={overscanColumnCount}
overscanRowCount={overscanRowCount}
rowCount={this.list.size}
rowHeight={rowHeight}
width={this.totalTableWidth}
/>
</div>
</div>
<div className="RightColumn">
<Grid
cellRenderer={this.renderGridCell}
columnCount={orderedColumnKeys.length}
columnWidth={getColumnWidth}
height={totalTableHeight - rowHeight}
onScroll={onScroll}
overscanColumnCount={overscanColumnCount}
overscanRowCount={overscanRowCount}
rowCount={this.list.size}
rowHeight={rowHeight}
width={this.totalTableWidth}
/>
</div>
</div>
)}
</ScrollSync>
)}
</ScrollSync>
</StyledFilterableTable>
);
}