fix(sidebar): keep connection search results visible
This commit is contained in:
1 parent
085a2f3870
commit
4d50af05fd
4 files changed
+68
-12
No files matched your search
@@ -6,7 +6,7 @@ import { useConnectionStore } from "@/stores/connectionStore";
|
||||
import { useQueryStore } from "@/stores/queryStore";
|
||||
import { useSettingsStore } from "@/stores/settingsStore";
|
||||
import type { QueryTab, TreeNode, TreeNodeType } from "@/types/database";
|
||||
import { filterSidebarTree } from "@/lib/sidebarSearchTree";
|
||||
import { filterSidebarSearchRootsByConnectionState, filterSidebarTree } from "@/lib/sidebarSearchTree";
|
||||
import { isCancelSearchShortcut } from "@/lib/keyboardShortcuts";
|
||||
import { usesTreeSchemaMode } from "@/lib/databaseFeatureSupport";
|
||||
import {
|
||||
@@ -139,10 +139,7 @@ const filteredNodes = computed(() => {
|
||||
const q = deferredSearchQuery.value;
|
||||
if (q) {
|
||||
nodes = filterSidebarTree(nodes, q, searchCollapsedIds.value, searchableNodeTypes.value);
|
||||
nodes = nodes.filter((node) => {
|
||||
if (node.type === "connection-group") return true;
|
||||
return node.connectionId ? store.connectedIds.has(node.connectionId) : true;
|
||||
});
|
||||
nodes = filterSidebarSearchRootsByConnectionState(nodes, store.connectedIds);
|
||||
}
|
||||
|
||||
return nodes;
|
||||
|
||||
Reference in new issue
Block a user