mirror of
https://github.com/apache/superset.git
synced 2026-04-11 20:37:16 +00:00
Fetch schemas separately. (#2227)
This commit is contained in:
@@ -112,10 +112,9 @@ ${this.props.queryEditor.schema}/${input}`;
|
||||
const actualDbId = dbId || this.props.queryEditor.dbId;
|
||||
if (actualDbId) {
|
||||
this.setState({ schemaLoading: true });
|
||||
const url = `/databasetablesasync/api/read?_flt_0_id=${actualDbId}`;
|
||||
const url = `/superset/schemas/${actualDbId}/`;
|
||||
$.get(url, (data) => {
|
||||
const schemas = data.result[0].all_schema_names;
|
||||
const schemaOptions = schemas.map((s) => ({ value: s, label: s }));
|
||||
const schemaOptions = data.schemas.map((s) => ({ value: s, label: s }));
|
||||
this.setState({ schemaOptions });
|
||||
this.setState({ schemaLoading: false });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user