fix(sidebar): keep table search pins across index rebuilds

Closes #8964
This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-09-13 23:30:58 +08:00
1 parent 91da8b2a9a
commit 78a78cc209
5 files changed
+100 -33

No files matched your search

+2 -2
View File
@@ -7,7 +7,7 @@ export function normalizeDatabaseObjectName(name: string): string {
return name.trim();
}
export function buildTableTreeNodes({ nodeId, connectionId, database, schema, tables, catalog }: { nodeId: string; connectionId: string; database: string; schema?: string; tables: TableInfo[]; catalog?: string }): TreeNode[] {
export function buildTableTreeNodes({ nodeId, connectionId, database, schema, tables, catalog, includeSchemaInId = false }: { nodeId: string; connectionId: string; database: string; schema?: string; tables: TableInfo[]; catalog?: string; includeSchemaInId?: boolean }): TreeNode[] {
const entries = tables.flatMap((table) => {
const name = normalizeDatabaseObjectName(table.name);
if (!name) return [];
@@ -19,7 +19,7 @@ export function buildTableTreeNodes({ nodeId, connectionId, database, schema, ta
connectionId,
database,
schema: childSchema,
includeSchemaInId: false,
includeSchemaInId,
name,
objectType,
tableType: table.table_type,