From 11fc941ea8ea4a8bdaaa954b32f1b5bf46658c45 Mon Sep 17 00:00:00 2001 From: Johnpaul Date: Tue, 9 Sep 2025 22:03:51 +0100 Subject: [PATCH] refactor: use storeToRefs for selectedItems in useSelectionState --- src/composables/graph/useSelectionState.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/composables/graph/useSelectionState.ts b/src/composables/graph/useSelectionState.ts index 9480462b25..7e41f680b6 100644 --- a/src/composables/graph/useSelectionState.ts +++ b/src/composables/graph/useSelectionState.ts @@ -1,3 +1,4 @@ +import { storeToRefs } from 'pinia' import { computed } from 'vue' import { useNodeLibrarySidebarTab } from '@/composables/sidebarTabs/useNodeLibrarySidebarTab' @@ -29,10 +30,10 @@ export function useSelectionState() { const nodeHelpStore = useNodeHelpStore() const { id: nodeLibraryTabId } = useNodeLibrarySidebarTab() - const selectedItems = computed(() => canvasStore.selectedItems) + const { selectedItems } = storeToRefs(canvasStore) const selectedNodes = computed(() => { - return selectedItems.value.filter((i) => isLGraphNode(i)) as LGraphNode[] + return selectedItems.value.filter((i) => isLGraphNode(i)) }) const nodeDef = computed(() => {