diff --git a/superset/assets/javascripts/addSlice/AddSliceContainer.jsx b/superset/assets/javascripts/addSlice/AddSliceContainer.jsx
index 2263e20e8d..c316e2c76e 100644
--- a/superset/assets/javascripts/addSlice/AddSliceContainer.jsx
+++ b/superset/assets/javascripts/addSlice/AddSliceContainer.jsx
@@ -17,9 +17,6 @@ export default class AddSliceContainer extends React.PureComponent {
const visTypeKeys = Object.keys(visTypes);
this.vizTypeOptions = visTypeKeys.map(vt => ({ label: visTypes[vt].label, value: vt }));
this.state = {
- datasourceValue: this.props.datasources[0].value,
- datasourceId: this.props.datasources[0].value.split('__')[0],
- datasourceType: this.props.datasources[0].value.split('__')[1],
visType: 'table',
};
}
@@ -42,14 +39,14 @@ export default class AddSliceContainer extends React.PureComponent {
});
}
- changeSliceName(e) {
- this.setState({ sliceName: e.target.value });
- }
-
changeVisType(e) {
this.setState({ visType: e.value });
}
+ isBtnDisabled() {
+ return !(this.state.datasourceId && this.state.visType);
+ }
+
render() {
return (
@@ -81,7 +78,11 @@ export default class AddSliceContainer extends React.PureComponent {
/>
-