mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45: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 FormSelectField from '../forms/FormSelectField.svelte';
|
||||
import { getObjectTypeFieldLabel } from '../utility/common';
|
||||
import { useDatabaseInfo, useDatabaseList } from '../utility/metadataLoaders';
|
||||
import { useConnectionInfo, useDatabaseInfo } from '../utility/metadataLoaders';
|
||||
|
||||
export let conidName;
|
||||
export let databaseName;
|
||||
@@ -14,7 +13,12 @@ import { getObjectTypeFieldLabel } from '../utility/common';
|
||||
export let name;
|
||||
|
||||
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([
|
||||
...($dbinfo?.tables || []),
|
||||
@@ -27,7 +31,6 @@ import { getObjectTypeFieldLabel } from '../utility/common';
|
||||
value: x.pureName,
|
||||
label: x.pureName,
|
||||
}));
|
||||
|
||||
</script>
|
||||
|
||||
<div class="wrapper">
|
||||
@@ -56,5 +59,4 @@ import { getObjectTypeFieldLabel } from '../utility/common';
|
||||
.wrapper {
|
||||
margin: var(--dim-large-form-margin);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user