dbgate/packages/web/src/appobj/SubDatabaseList.svelte
2022-03-05 11:14:07 +01:00

23 lines
627 B
Svelte

<script lang="ts">
import { filterName } from 'dbgate-tools';
import _ from 'lodash';
import { useDatabaseList } from '../utility/metadataLoaders';
import AppObjectList from './AppObjectList.svelte';
import * as databaseAppObject from './DatabaseAppObject.svelte';
export let filter;
export let data;
export let passProps;
$: databases = useDatabaseList({ conid: data._id });
</script>
<AppObjectList
list={_.sortBy(
($databases || []).filter(x => filterName(filter, x.name)),
x => x.sortOrder ?? x.name
).map(db => ({ ...db, connection: data }))}
module={databaseAppObject}
{passProps}
/>