Fix sizing error when switching between vertical and horizontal
parent
78215465af
commit
d5d4292c26
|
@ -213,7 +213,7 @@ class TableGraph extends Component {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
calculateColumnWidth = column => {
|
calculateColumnWidth = __ => column => {
|
||||||
const {index} = column
|
const {index} = column
|
||||||
const {tableOptions: {fixFirstColumn}} = this.props
|
const {tableOptions: {fixFirstColumn}} = this.props
|
||||||
const {processedData, columnWidths, totalColumnWidths} = this.state
|
const {processedData, columnWidths, totalColumnWidths} = this.state
|
||||||
|
@ -370,11 +370,11 @@ class TableGraph extends Component {
|
||||||
columnMinWidth={COLUMN_MIN_WIDTH}
|
columnMinWidth={COLUMN_MIN_WIDTH}
|
||||||
width={tableWidth}
|
width={tableWidth}
|
||||||
>
|
>
|
||||||
{({registerChild}) => (
|
{({columnWidth, registerChild}) => (
|
||||||
<MultiGrid
|
<MultiGrid
|
||||||
ref={r => this.getMultiGridRef(r, registerChild)}
|
ref={r => this.getMultiGridRef(r, registerChild)}
|
||||||
columnCount={columnCount}
|
columnCount={columnCount}
|
||||||
columnWidth={this.calculateColumnWidth}
|
columnWidth={this.calculateColumnWidth(columnWidth)}
|
||||||
rowCount={rowCount}
|
rowCount={rowCount}
|
||||||
rowHeight={ROW_HEIGHT}
|
rowHeight={ROW_HEIGHT}
|
||||||
height={tableHeight}
|
height={tableHeight}
|
||||||
|
|
Loading…
Reference in New Issue