Skip to content

Commit

Permalink
fix: Allow users to update database in Dataset Edit Modal (#17265)
Browse files Browse the repository at this point in the history
* add condition to fix save

* remove console.log
  • Loading branch information
hughhhh authored Oct 29, 2021
1 parent b7bda70 commit d0bad96
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ class DatasourceEditor extends React.PureComponent {
const { datasourceType, datasource } = this.state;
const sql =
datasourceType === DATASOURCE_TYPES.physical.key ? '' : datasource.sql;

const newDatasource = {
...this.state.datasource,
sql,
Expand All @@ -489,6 +488,7 @@ class DatasourceEditor extends React.PureComponent {
}

onDatasourcePropChange(attr, value) {
if (value === undefined) return; // if value is undefined do not update state
const datasource = { ...this.state.datasource, [attr]: value };
this.setState(
prevState => ({
Expand Down

0 comments on commit d0bad96

Please sign in to comment.