mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 05:26:00 +00:00
fix - don't call for DB list when searching in connections list
This commit is contained in:
@@ -61,7 +61,13 @@
|
||||
|
||||
{#if (isExpanded || isExpandedBySearch) && subItemsComponent}
|
||||
<div class="subitems">
|
||||
<svelte:component this={subItemsComponent} {data} {filter} {passProps} />
|
||||
<svelte:component
|
||||
this={subItemsComponent}
|
||||
{data}
|
||||
{filter}
|
||||
{passProps}
|
||||
isExpandedOnlyBySearch={isExpandedBySearch && !isExpanded}
|
||||
/>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -5,17 +5,21 @@
|
||||
import AppObjectList from './AppObjectList.svelte';
|
||||
import * as databaseAppObject from './DatabaseAppObject.svelte';
|
||||
import { volatileConnectionMapStore } from '../utility/api';
|
||||
import { getLocalStorage } from '../utility/storageCache';
|
||||
|
||||
export let filter;
|
||||
export let data;
|
||||
export let passProps;
|
||||
|
||||
$: databases = useDatabaseList({ conid: data._id });
|
||||
export let isExpandedOnlyBySearch;
|
||||
|
||||
$: databases = useDatabaseList({ conid: isExpandedOnlyBySearch ? null : data._id });
|
||||
$: dbList = isExpandedOnlyBySearch ? getLocalStorage(`database_list_${data._id}`) || [] : $databases || [];
|
||||
</script>
|
||||
|
||||
<AppObjectList
|
||||
list={_.sortBy(
|
||||
($databases || []).filter(x => filterName(filter, x.name)),
|
||||
dbList.filter(x => filterName(filter, x.name)),
|
||||
x => x.sortOrder ?? x.name
|
||||
).map(db => ({ ...db, connection: data }))}
|
||||
module={databaseAppObject}
|
||||
|
||||
Reference in New Issue
Block a user