From cc6a2f4548ae1c7d351546384443eb9472048527 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sat, 2 Nov 2024 11:59:40 +1100 Subject: [PATCH] Re-render panels when context changes (#8407) --- src/frontend/src/hooks/UsePluginPanels.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/hooks/UsePluginPanels.tsx b/src/frontend/src/hooks/UsePluginPanels.tsx index 7b0a0e2fea..d8352c666e 100644 --- a/src/frontend/src/hooks/UsePluginPanels.tsx +++ b/src/frontend/src/hooks/UsePluginPanels.tsx @@ -76,6 +76,7 @@ export function usePluginPanels({ // Cache the context data which is delivered to the plugins const inventreeContext = useInvenTreeContext(); + const contextData = useMemo(() => { return { model: model, @@ -83,7 +84,7 @@ export function usePluginPanels({ instance: instance, ...inventreeContext }; - }, [model, id, instance]); + }, [model, id, instance, inventreeContext]); const pluginPanels: PanelType[] = useMemo(() => { return (