fix(grid): preserve data tab scroll and search across switches

This commit is contained in:
onenewcode authored and GitHub committed 2026-09-09 12:01:49 +08:00
1 parent ed29ef9eed
commit 451e50b2fb
11 files changed
+652 -15

No files matched your search

@@ -1533,9 +1533,7 @@ function openMongoTreeData(node: TreeNode) {
return;
}
if (node.type !== "mongo-collection") return;
const existing = queryStore.tabs.find(
(tab) => tab.mode === "mongo" && tab.connectionId === node.connectionId && tab.database === node.database && tab.tableMeta?.tableName === node.label,
);
const existing = queryStore.tabs.find((tab) => tab.mode === "mongo" && tab.connectionId === node.connectionId && tab.database === node.database && tab.tableMeta?.tableName === node.label);
if (existing) {
queryStore.switchTab(existing.id);
return;