import export

This commit is contained in:
Jan Prochazka
2021-03-11 20:37:05 +01:00
parent c2c54856ff
commit 2063005d5c
12 changed files with 716 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
<script lang="ts">
import { getFormContext } from '../forms/FormProviderCore.svelte';
import FormSelectField from '../forms/FormSelectField.svelte';
import { useDatabaseList } from '../utility/metadataLoaders';
export let conidName;
const { values } = getFormContext();
$: databases = useDatabaseList({ conid: $values[conidName] });
$: databaseOptions = ($databases || []).map(db => ({
value: db.name,
label: db.name,
}));
</script>
{#if databaseOptions.length == 0}
<div>Not available</div>
{:else}
<FormSelectField {...$$restProps} options={databaseOptions} />
{/if}