mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix: Allow users to update database in Dataset Edit Modal (#17265)
* add condition to fix save * remove console.log
This commit is contained in:
parent
b7bda7031e
commit
d0bad96b1a
@ -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 => ({
|
||||
|
Loading…
Reference in New Issue
Block a user