Change dataExists to a bool and handle instances of Autorefresh where grabdatafordownload is not defined

pull/10616/head
deniz kusefoglu 2017-10-16 09:55:03 -07:00
parent 921bf66dc8
commit 84c8945ff4
3 changed files with 6 additions and 4 deletions

View File

@ -156,7 +156,9 @@ const AutoRefresh = ComposedComponent => {
lastQuerySuccessful,
isFetching: false,
})
grabDataForDownload(timeSeries)
if (grabDataForDownload) {
grabDataForDownload(timeSeries)
}
})
},

View File

@ -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}

View File

@ -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