mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 21:55:59 +00:00
pinned objects fixes
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
import SqlObjectList from './SqlObjectList.svelte';
|
||||
import DbKeysTree from './DbKeysTree.svelte';
|
||||
import SingleConnectionDatabaseList from './SingleConnectionDatabaseList.svelte';
|
||||
import _ from 'lodash';
|
||||
|
||||
export let hidden = false;
|
||||
|
||||
@@ -39,8 +40,8 @@
|
||||
name="pinned"
|
||||
height="15%"
|
||||
storageName="pinnedItemsWidget"
|
||||
skip={!$pinnedDatabases?.length &&
|
||||
!$pinnedTables.some(x => x.conid == conid && x.database == $currentDatabase?.name)}
|
||||
skip={!_.compact($pinnedDatabases).length &&
|
||||
!$pinnedTables.some(x => x && x.conid == conid && x.database == $currentDatabase?.name)}
|
||||
>
|
||||
<PinnedObjectsList />
|
||||
</WidgetColumnBarItem>
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
const connectionColorFactory = useConnectionColorFactory(3);
|
||||
|
||||
$: filteredTables = $pinnedTables.filter(
|
||||
x => x.conid == $currentDatabase?.connection?._id && x.database == $currentDatabase?.name
|
||||
x => x?.conid == $currentDatabase?.connection?._id && x?.database == $currentDatabase?.name
|
||||
);
|
||||
</script>
|
||||
|
||||
<WidgetsInnerContainer>
|
||||
<AppObjectList
|
||||
list={[...$pinnedDatabases, ...filteredTables]}
|
||||
list={[..._.compact($pinnedDatabases), ..._.compact(filteredTables)]}
|
||||
module={pinnedAppObject}
|
||||
passProps={{ connectionColorFactory: $connectionColorFactory }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user