From f719222ab33b36e2f677c74bb747f9825c08c718 Mon Sep 17 00:00:00 2001 From: mvdbeek Date: Wed, 27 Mar 2024 10:20:10 +0100 Subject: [PATCH] Make toolsById a shallowRef A given tool never changes attributes (currently), so no need to track reactivity for the whole object. --- client/src/stores/toolStore.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/stores/toolStore.ts b/client/src/stores/toolStore.ts index 694322d3c0d..69f0d897da0 100644 --- a/client/src/stores/toolStore.ts +++ b/client/src/stores/toolStore.ts @@ -4,7 +4,7 @@ import axios from "axios"; import { defineStore } from "pinia"; -import Vue, { computed, Ref, ref } from "vue"; +import Vue, { computed, Ref, ref, shallowRef } from "vue"; import { createWhooshQuery, filterTools, types_to_icons } from "@/components/Panels/utilities"; import { useUserLocalStorage } from "@/composables/userLocalStorage"; @@ -75,7 +75,7 @@ export interface PanelView { export const useToolStore = defineStore("toolStore", () => { const currentPanelView: Ref = useUserLocalStorage("tool-store-view", ""); const defaultPanelView: Ref = ref(""); - const toolsById = ref>({}); + const toolsById = shallowRef>({}); const toolResults = ref>({}); const panel = ref>>({}); const panelViews = ref>({});