loading schemas indicator + error reporting

This commit is contained in:
SPRINX0\prochazka
2024-09-20 14:40:14 +02:00
parent ce70b2e71a
commit 8aac9cf59d
8 changed files with 46 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
<script lang="ts">
import _ from 'lodash';
import { getFormContext } from '../forms/FormProviderCore.svelte';
import FormSelectField from '../forms/FormSelectField.svelte';
import { useSchemaList } from '../utility/metadataLoaders';
@@ -9,7 +10,7 @@
const { values } = getFormContext();
$: schemaList = useSchemaList({ conid: $values[conidName], database: values[databaseName] });
$: schemaOptions = ($schemaList || []).map(schema => ({
$: schemaOptions = (_.isArray($schemaList) ? $schemaList : []).map(schema => ({
value: schema.schemaName,
label: schema.schemaName,
}));