mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 12:56:00 +00:00
error handler improved, fixes
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script lang="ts">
|
||||
import _ from 'lodash';
|
||||
|
||||
import { getFormContext } from '../forms/FormProviderCore.svelte';
|
||||
import FormSelectField from '../forms/FormSelectField.svelte';
|
||||
import { useDatabaseList } from '../utility/metadataLoaders';
|
||||
@@ -8,10 +10,13 @@
|
||||
const { values } = getFormContext();
|
||||
$: databases = useDatabaseList({ conid: $values[conidName] });
|
||||
|
||||
$: databaseOptions = ($databases || []).map(db => ({
|
||||
value: db.name,
|
||||
label: db.name,
|
||||
}));
|
||||
$: databaseOptions = _.sortBy(
|
||||
($databases || []).map(db => ({
|
||||
value: db.name,
|
||||
label: db.name,
|
||||
})),
|
||||
'label'
|
||||
);
|
||||
</script>
|
||||
|
||||
<FormSelectField {...$$restProps} options={databaseOptions} />
|
||||
|
||||
Reference in New Issue
Block a user