mirror of
https://github.com/apache/superset.git
synced 2026-04-16 14:45:21 +00:00
[explorev2] Bug fixes in Save Modal (#1707)
* Bug fixes in Save Modal Issues solved: - Save button doesn't pass in gotodash - slice_name was passed in from store as original slice_name instead of new one in 'saveas' action - datasource_type wasn't passed in to defaultViz and defaultForm function * Change css filename to exploreV2 * Moved out utils
This commit is contained in:
@@ -4,7 +4,7 @@ import $ from 'jquery';
|
||||
import { Modal, Alert, Button, Radio } from 'react-bootstrap';
|
||||
import Select from 'react-select';
|
||||
import { connect } from 'react-redux';
|
||||
import { getParamObject } from '../../modules/utils.js';
|
||||
import { getParamObject } from '../exploreUtils';
|
||||
|
||||
const propTypes = {
|
||||
can_edit: PropTypes.bool,
|
||||
@@ -58,7 +58,8 @@ class SaveModal extends React.Component {
|
||||
saveOrOverwrite(gotodash) {
|
||||
this.setState({ alert: null });
|
||||
this.props.actions.removeSaveModalAlert();
|
||||
const params = getParamObject(this.props.form_data, this.props.datasource_type);
|
||||
const params = getParamObject(
|
||||
this.props.form_data, this.props.datasource_type, this.state.action === 'saveas');
|
||||
const sliceParams = {};
|
||||
params.datasource_name = this.props.form_data.datasource_name;
|
||||
|
||||
@@ -199,7 +200,7 @@ class SaveModal extends React.Component {
|
||||
type="button"
|
||||
id="btn_modal_save"
|
||||
className="btn pull-left"
|
||||
onClick={this.saveOrOverwrite.bind(this)}
|
||||
onClick={this.saveOrOverwrite.bind(this, false)}
|
||||
>
|
||||
Save
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user