fix: Allow users to update database in Dataset Edit Modal (#17265)

* add condition to fix save

* remove console.log
This commit is contained in:
Hugh A. Miles II 2021-10-29 17:19:37 -04:00 committed by GitHub
parent b7bda7031e
commit d0bad96b1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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,
@ -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 => ({