mirror of
https://github.com/apache/superset.git
synced 2026-04-10 20:06:13 +00:00
add test coverage for SqlEditorLeftBar (#2984)
This commit is contained in:
@@ -75,7 +75,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
if (dbId && schema) {
|
||||
this.setState({ tableLoading: true, tableOptions: [] });
|
||||
const url = `/superset/tables/${dbId}/${schema}/${substr}/`;
|
||||
$.get(url, (data) => {
|
||||
$.get(url).done((data) => {
|
||||
const filterOptions = createFilterOptions({ options: data.options });
|
||||
this.setState({
|
||||
filterOptions,
|
||||
@@ -121,7 +121,7 @@ class SqlEditorLeftBar extends React.PureComponent {
|
||||
if (actualDbId) {
|
||||
this.setState({ schemaLoading: true });
|
||||
const url = `/superset/schemas/${actualDbId}/`;
|
||||
$.get(url, (data) => {
|
||||
$.get(url).done((data) => {
|
||||
const schemaOptions = data.schemas.map(s => ({ value: s, label: s }));
|
||||
this.setState({ schemaOptions, schemaLoading: false });
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user