Change dataExists to a bool and handle instances of Autorefresh where grabdatafordownload is not defined
parent
921bf66dc8
commit
84c8945ff4
|
@ -156,7 +156,9 @@ const AutoRefresh = ComposedComponent => {
|
||||||
lastQuerySuccessful,
|
lastQuerySuccessful,
|
||||||
isFetching: false,
|
isFetching: false,
|
||||||
})
|
})
|
||||||
grabDataForDownload(timeSeries)
|
if (grabDataForDownload) {
|
||||||
|
grabDataForDownload(timeSeries)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ class LayoutCell extends Component {
|
||||||
<div className="dash-graph">
|
<div className="dash-graph">
|
||||||
<LayoutCellMenu
|
<LayoutCellMenu
|
||||||
cell={cell}
|
cell={cell}
|
||||||
dataExists={celldata.length}
|
dataExists={!!celldata.length}
|
||||||
isDeleting={isDeleting}
|
isDeleting={isDeleting}
|
||||||
isEditable={isEditable}
|
isEditable={isEditable}
|
||||||
onDelete={this.handleDeleteCell}
|
onDelete={this.handleDeleteCell}
|
||||||
|
|
|
@ -53,7 +53,7 @@ const LayoutCellMenuContainer = props => {
|
||||||
return <LayoutCellMenu {...props} />
|
return <LayoutCellMenu {...props} />
|
||||||
}
|
}
|
||||||
|
|
||||||
const {bool, func, shape, number} = PropTypes
|
const {bool, func, shape} = PropTypes
|
||||||
|
|
||||||
LayoutCellMenuContainer.propTypes = {
|
LayoutCellMenuContainer.propTypes = {
|
||||||
isDeleting: bool,
|
isDeleting: bool,
|
||||||
|
@ -62,7 +62,7 @@ LayoutCellMenuContainer.propTypes = {
|
||||||
onDeleteClick: func,
|
onDeleteClick: func,
|
||||||
cell: shape(),
|
cell: shape(),
|
||||||
isEditable: bool,
|
isEditable: bool,
|
||||||
dataExists: number,
|
dataExists: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
LayoutCellMenu.propTypes = LayoutCellMenuContainer.propTypes
|
LayoutCellMenu.propTypes = LayoutCellMenuContainer.propTypes
|
||||||
|
|
Loading…
Reference in New Issue