mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 21:05:59 +00:00
fix export dialog for useSeparateSchemas=true
This commit is contained in:
@@ -5,8 +5,7 @@
|
|||||||
|
|
||||||
import { getFormContext } from '../forms/FormProviderCore.svelte';
|
import { getFormContext } from '../forms/FormProviderCore.svelte';
|
||||||
import FormSelectField from '../forms/FormSelectField.svelte';
|
import FormSelectField from '../forms/FormSelectField.svelte';
|
||||||
import { getObjectTypeFieldLabel } from '../utility/common';
|
import { useConnectionInfo, useDatabaseInfo } from '../utility/metadataLoaders';
|
||||||
import { useDatabaseInfo, useDatabaseList } from '../utility/metadataLoaders';
|
|
||||||
|
|
||||||
export let conidName;
|
export let conidName;
|
||||||
export let databaseName;
|
export let databaseName;
|
||||||
@@ -14,7 +13,12 @@ import { getObjectTypeFieldLabel } from '../utility/common';
|
|||||||
export let name;
|
export let name;
|
||||||
|
|
||||||
const { values, setFieldValue } = getFormContext();
|
const { values, setFieldValue } = getFormContext();
|
||||||
$: dbinfo = useDatabaseInfo({ conid: $values[conidName], database: $values[databaseName] });
|
|
||||||
|
$: coninfo = useConnectionInfo({ conid: $values[conidName] });
|
||||||
|
$: dbinfo = useDatabaseInfo({
|
||||||
|
conid: $values[conidName],
|
||||||
|
database: $coninfo?.useSeparateSchemas ? `${$values[databaseName]}::${$values[schemaName]}` : $values[databaseName],
|
||||||
|
});
|
||||||
|
|
||||||
$: tablesOptions = _.compact([
|
$: tablesOptions = _.compact([
|
||||||
...($dbinfo?.tables || []),
|
...($dbinfo?.tables || []),
|
||||||
@@ -27,7 +31,6 @@ import { getObjectTypeFieldLabel } from '../utility/common';
|
|||||||
value: x.pureName,
|
value: x.pureName,
|
||||||
label: x.pureName,
|
label: x.pureName,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
@@ -56,5 +59,4 @@ import { getObjectTypeFieldLabel } from '../utility/common';
|
|||||||
.wrapper {
|
.wrapper {
|
||||||
margin: var(--dim-large-form-margin);
|
margin: var(--dim-large-form-margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user