fix(grid): improve scrolling and sidebar responsiveness

This commit is contained in:
juve authored and GitHub committed 2026-07-13 16:12:54 +08:00
1 parent 67541232a2
commit 29b351691a
8 files changed
+142 -41

No files matched your search

@@ -218,6 +218,10 @@ export const useConnectionStore = defineStore("connection", () => {
const activeConnectionId = ref<string | null>(localStorage.getItem(ACTIVE_CONNECTION_STORAGE_KEY));
const selectedTreeNodeId = ref<string | null>(null);
const selectedTreeNodeIds = ref<string[]>([]);
// O(1) membership set — rebuilds only when selectedTreeNodeIds changes.
// Avoids O(N) Array.includes() in every visible TreeItem's isMultiSelected
// computed during scrolling and selection changes.
const selectedTreeNodeIdsSet = computed(() => new Set(selectedTreeNodeIds.value));
const treeSelectionAnchorId = ref<string | null>(null);
const connectionMultiSelectActive = ref(false);
const treeClipboard = ref<TreeClipboard | null>(null);
@@ -5062,6 +5066,7 @@ export const useConnectionStore = defineStore("connection", () => {
activeConnectionId,
selectedTreeNodeId,
selectedTreeNodeIds,
selectedTreeNodeIdsSet,
treeSelectionAnchorId,
connectionMultiSelectActive,
treeClipboard,