mirror of https://github.com/apache/superset.git
This commit is contained in:
parent
1d9dbcd9dc
commit
3fd6e0630e
|
@ -349,7 +349,7 @@ class ExploreViewContainer extends React.Component {
|
|||
}}
|
||||
>
|
||||
<QueryAndSaveBtns
|
||||
canAdd="True"
|
||||
canAdd={!!(this.props.can_add || this.props.can_overwrite)}
|
||||
onQuery={this.onQuery}
|
||||
onSave={this.toggleModal}
|
||||
onStop={this.onStop}
|
||||
|
@ -396,6 +396,7 @@ function mapStateToProps(state) {
|
|||
datasourceId: explore.datasource_id,
|
||||
controls: explore.controls,
|
||||
can_overwrite: !!explore.can_overwrite,
|
||||
can_add: !!explore.can_add,
|
||||
can_download: !!explore.can_download,
|
||||
column_formats: explore.datasource
|
||||
? explore.datasource.column_formats
|
||||
|
|
|
@ -24,7 +24,7 @@ import classnames from 'classnames';
|
|||
import Button from '../../components/Button';
|
||||
|
||||
const propTypes = {
|
||||
canAdd: PropTypes.string.isRequired,
|
||||
canAdd: PropTypes.bool.isRequired,
|
||||
onQuery: PropTypes.func.isRequired,
|
||||
onSave: PropTypes.func,
|
||||
onStop: PropTypes.func,
|
||||
|
@ -49,7 +49,7 @@ export default function QueryAndSaveBtns({
|
|||
errorMessage,
|
||||
}) {
|
||||
const saveClasses = classnames({
|
||||
'disabled disabledButton': canAdd !== 'True',
|
||||
'disabled disabledButton': !canAdd,
|
||||
});
|
||||
|
||||
let qryButtonStyle = 'default';
|
||||
|
|
Loading…
Reference in New Issue