Pass datasource as form_data param (#4538)

* Pass datasource as form_data param

* add comma after datasource

* change test to match new addSlice
This commit is contained in:
Riku Pelkonen
2018-03-05 21:43:59 +02:00
committed by Grace Guo
parent 413585448e
commit 007ad351cf
2 changed files with 6 additions and 2 deletions

View File

@@ -23,7 +23,11 @@ export default class AddSliceContainer extends React.PureComponent {
}
exploreUrl() {
const formData = encodeURIComponent(JSON.stringify({ viz_type: this.state.visType }));
const formData = encodeURIComponent(
JSON.stringify({
viz_type: this.state.visType,
datasource: this.state.datasourceValue,
}));
return `/superset/explore/?form_data=${formData}`;
}