From fa9141f19dd8b1431054fafa614b59a6eda3f9bd Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 1 Nov 2024 23:59:13 +0000 Subject: [PATCH] Re-render panels when context changes --- 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 7b0a0e2fead7..d8352c666e04 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 (