Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
fix: fixes #228 - don't reset hierarchyConfig on dataset select
Browse files Browse the repository at this point in the history
  • Loading branch information
rashley-iqt committed Feb 4, 2019
1 parent d73559c commit 32eb4ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/features/dataset-controls/DatasetControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ class DatasetControls extends React.Component {

this.props.removeDataset({owner: this.props.uuid});
this.props.removeSearchIndex({owner: this.props.uuid});
this.props.setHierarchyConfig([]);
this.props.colorBy(null);
this.props.showNodes(true);
this.props.stopRefresh();

const showUrlEntry = dataset === CUSTOM_DATASET;
Expand All @@ -125,8 +122,6 @@ class DatasetControls extends React.Component {
}

onUpload = (file) => {
this.props.setHierarchyConfig([]);
this.props.colorBy(null);
this.props.uploadDataset({ 'owner': this.props.uuid, 'file': file });
this.props.stopRefresh();
this.setState({
Expand Down Expand Up @@ -363,8 +358,11 @@ DatasetControls.defaultProps = {
uuid: uuidv4(),
datasets: [],
dataset: null,
hierarchyConfig: [],
configHasChanged: false,
isFetching: false,
lastUpdated: new Date(),

};

DatasetControls.propTypes = {
Expand All @@ -386,6 +384,8 @@ DatasetControls.propTypes = {
isFetching: PropTypes.bool,
lastUpdated: PropTypes.instanceOf(Date),
setError: PropTypes.func.isRequired,
hierarchyConfig: PropTypes.array,
configHasChanged: PropTypes.bool
};

const mapStateToProps = (state, ownProps) => {
Expand Down

0 comments on commit 32eb4ce

Please sign in to comment.