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,
|
||||
isFetching: false,
|
||||
})
|
||||
grabDataForDownload(timeSeries)
|
||||
if (grabDataForDownload) {
|
||||
grabDataForDownload(timeSeries)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class LayoutCell extends Component {
|
|||
<div className="dash-graph">
|
||||
<LayoutCellMenu
|
||||
cell={cell}
|
||||
dataExists={celldata.length}
|
||||
dataExists={!!celldata.length}
|
||||
isDeleting={isDeleting}
|
||||
isEditable={isEditable}
|
||||
onDelete={this.handleDeleteCell}
|
||||
|
|
|
@ -53,7 +53,7 @@ const LayoutCellMenuContainer = props => {
|
|||
return <LayoutCellMenu {...props} />
|
||||
}
|
||||
|
||||
const {bool, func, shape, number} = PropTypes
|
||||
const {bool, func, shape} = PropTypes
|
||||
|
||||
LayoutCellMenuContainer.propTypes = {
|
||||
isDeleting: bool,
|
||||
|
@ -62,7 +62,7 @@ LayoutCellMenuContainer.propTypes = {
|
|||
onDeleteClick: func,
|
||||
cell: shape(),
|
||||
isEditable: bool,
|
||||
dataExists: number,
|
||||
dataExists: bool,
|
||||
}
|
||||
|
||||
LayoutCellMenu.propTypes = LayoutCellMenuContainer.propTypes
|
||||
|
|
Loading…
Reference in New Issue