Add guards for grids missing in logs table

pull/3651/head
Brandon Farmer 2018-06-12 14:46:43 -07:00
parent ddc6c73f6b
commit 523ab6edc0
1 changed files with 12 additions and 5 deletions

View File

@ -89,13 +89,17 @@ class LogsTable extends Component<Props, State> {
}
public componentDidUpdate() {
if (this.grid) {
this.grid.recomputeGridSize()
}
if (this.isTableEmpty) {
return
}
this.headerGrid.current.recomputeGridSize()
if (this.grid) {
this.grid.recomputeGridSize()
}
if (this.headerGrid.current) {
this.headerGrid.current.recomputeGridSize()
}
}
public componentDidMount() {
@ -103,7 +107,10 @@ class LogsTable extends Component<Props, State> {
if (this.grid) {
this.grid.recomputeGridSize()
}
this.headerGrid.current.recomputeGridSize()
if (this.headerGrid.current) {
this.headerGrid.current.recomputeGridSize()
}
}
public componentWillUnmount() {